I want to handle errors in a file upload form. The problem I'm encountering occurs when I try to upload a file that is larger than the post_max_size php.ini directive.
I want to use [tt]$_FILES['fileinputname']['error'] == UPLOAD_ERR_INI_SIZE[/tt] to determine whether or not I should show an error message. When I upload a file that's too large, both [tt]$_POST[/tt] and [tt]$_FILES[/tt] are empty.
I get the following error in my server's error log:
How can I properly detect and report this error?
Thank you.
--
-- Ghodmode
Give a man a fish and he'll come back to buy more... Teach a man to fish and you're out of business.
I want to use [tt]$_FILES['fileinputname']['error'] == UPLOAD_ERR_INI_SIZE[/tt] to determine whether or not I should show an error message. When I upload a file that's too large, both [tt]$_POST[/tt] and [tt]$_FILES[/tt] are empty.
I get the following error in my server's error log:
Code:
PHP Warning: POST Content-Length of 10134524 bytes exceeds the limit of 8388608 bytes in Unknown on line 0, referer: [URL unfurl="true"]http://home/script.php[/URL]
How can I properly detect and report this error?
Thank you.
--
-- Ghodmode
Give a man a fish and he'll come back to buy more... Teach a man to fish and you're out of business.