Forum Moderators: coopster

Message Too Old, No Replies

uploaded file is not returning an error

file is larger than max_post_size

         

jezra

1:59 am on Nov 12, 2004 (gmt 0)

10+ Year Member



I've set up a file upload script for my users. When a user uploads a file that is larger than the max_post_size, the script runs for an unusually long time and fails to set any errors in the $_FILE array. An upload that is larger than max_file_size and less than max_post_size will generate errors as expected. It appears that the script fails to finish reading the post data and continues to churn along. If anyone has experienced this issue before, I would greatly appreciate some advice.

For what it is worth:
IIS 5 Win2k Server
PHP 4.3.9

coopster

12:23 pm on Nov 12, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I don't know if you simply keyed them incorrectly in this message but those directives don't look right...Handling File Uploads [php.net]

jezra

5:59 pm on Nov 12, 2004 (gmt 0)

10+ Year Member



sorry about that, I was flustered and losing my mind. It was bad typing on my part. It should be
post_max_size and upload_max_filesize in the php.ini
A stop-gap fix would be increase the post_max_size to something very high, although I would really like to find out why no errors are returned. Is this just the nature of the POST beast?

coopster

6:56 pm on Nov 12, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Don't know on IIS. On Apache there is the limitrequestbody [httpd.apache.org] configuration directive.

jezra

7:46 pm on Nov 12, 2004 (gmt 0)

10+ Year Member



Thanks coopster,
I searched the web for something similar to limitrequestbody for IIS and found MaxClientRequestBuffer [support.microsoft.com]. Although I don't think it will help in my case, I though I should mention it in case anyone else is interested.