Jump to content

Can't Upload Files, Post Content Length Shown As 100 Bytes


Recommended Posts

Within the last month or so, I'm having problems uploading on various WordPress blogs that I'm running on various TCH servers. This problem happens with WordPress 2.9.2, 3.0 and 3.0.1. Using the Flash uploader, it either just hangs after the progress bar hits 100% and says "Crunching..." Or I get


The uploaded file exceeds the <code>upload_max_filesize</code> directive in <code>php.ini</code>.


When I use the browser uploader, I either get "Error saving media attachment" or "Please Try Again."


Is there something that couldn't have changed on the server that is causing this?


In any case, I am seeing an error_log file with entries like the following:


PHP Warning: POST Content-Length of 2088738 bytes exceeds the limit of 100 bytes in Unknown on line 0


When I originally setup the blogs, I set post_max_size and upload_max_filesize to 10MB (it defaults to 2MB). I'm not sure why PHP thinks I can only upload 100 bytes at a time and is no longer honoring the 10MB set limit or 2MB default limits for this.


Has anyone else seen this behavior?




Link to comment
Share on other sites

Sure enough as soon as I post this, I figured out what was happening...


I had the following in .htaccess


php_value post_max_size 100M

php_value upload_max_filesize 100M


This used to work, but now it doesn't. Perhaps PHP was upgraded?


If I get rid of the "M" and write out the size in bytes, everything works.


php_value post_max_size 110000000

php_value upload_max_filesize 104857600

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...