Page 1 of 1

Capturing errors when a large file is uploading

Posted: Mon Jun 28, 2010 3:56 pm
by eruna
When a file is uploaded larger than the max_upload the script is killed and it shows a white screen.
How can I get it to return an error rather than end the script?
I tried using the MAX_FILE_SIZE field in the form, but that only returned an error when the file was below the php max.
Otherwise it also produced a white screen.

Any ideas?

E

Re: Capturing errors when a large file is uploading

Posted: Mon Jun 28, 2010 4:36 pm
by Crys
post_max_size ?

Re: Capturing errors when a large file is uploading

Posted: Mon Jun 28, 2010 4:42 pm
by Crys
And much depends on the configuration server. In normal operation, $ _FILES and $ _POST should be empty. Not page :)

Re: Capturing errors when a large file is uploading

Posted: Mon Jun 28, 2010 4:55 pm
by eruna
Right that's what I meant. It shuts down the script when the file is above the maximum allowed in the PHP ini.