Page 1 of 1

File too big / Session timeout

Posted: Thu Oct 21, 2010 9:43 am
by TorMike
So I'm uploading images files (JPG, PNG, GIF) using PHP $_FILE array.

I check the $_FILE['<username>']['error'], to ensure the value in NOT > 0. Should I also be checking the max_execution_time (set_time_limit) to ensure that the upload should be stopped prior to failing?

But how do you check whether it's taking too much time? How would you construct a IF-ELSE statement.

Any suggestions?

Re: File too big / Session timeout

Posted: Thu Oct 21, 2010 9:48 am
by VladSun
If you don't want to increase session time, build a "session-live-keeper". It could be an IFRAME with a document with a self-refresh (e.g. every 1 minute) meta tag, reloading a dummy PHP file containing session_start().
Or you could do this with AJAX, JavaScript etc.