Tuesday, April 22, 2008

PHP File Upload Problem Solved!

I finally managed to solve the PHP File Upload Stalemate!

Thanks, in part, to this forum thread... and a bunch of tinkering around in my php.ini file...

I realized that the directives that I modified from:

memory_limit = 8M
post_max_size = 8M
upload_max_filesize = 2M

And changed to:

memory_limit = 8000M
post_max_size = 7000M
upload_max_filesize = 6000M

Was causing me to get the following in my HTTPD/error_log:

[error] PHP Warning: POST Content-Length of 363120480 bytes exceeds the limit of -1249902592 bytes in Unknown on line 0

More specifically it appears that it was the fact that there was just too much of a differential in the post_max_size and the upload_max_filesize that was causing the error...

Which was why PHP would overflow to the negative value... and is considered a feature - though not too many people (probably including myself) would really consider such as a feature!!

I was able to fix the error by modifying my edits of the directives to:

memory_limit = 8000M
post_max_size = 6000M
upload_max_filesize = 6000M

And now it works like a charm!...

So far at least with the large 346.3 M file I tested it with. Hopefully it will still work with larger files!

Now it's pretty much off to the races to finish testing the rest of my project.

One set-back down and very likely several more to go!

Permalink/TrackBack:
http://bvanscoter.blogspot.com/2008/04/php-file-upload-problem-solved.html

 

pages

legal information

privacy policy

We respect your privacy and promise to never sell, barter, share or rent your information to any unauthorized third party. By providing your contact information you are also requesting and agreeing to receive important information about future events. (You may unsubscribe at any time.)
view full privacy policy here

certification of authenticity

I certify that the information contained on this site is true and complete to the best of my knowledge and understanding, any discrepencies will be governed by the terms of use.

terms of use

Everything we provide is provided "as is" including but not limited to the implied warranties of merchantability or fitness for a particular purpose, without any promise or guarantee of earnings. All forward looking statements on any of our materials are intended as an expression our opinion and will not responsible for any incidental or consequential damages from your actions.
view official terms of use