500 internal server error while uploading files bigger then 100kb – mod_fcgid problem

500 internal server error while uploading files bigger then 100kb – mod_fcgid problem

When the PHP handler is fast cgi, even if the post_max_size and upload_max_filesize are set to 20mb, when we upload a file say 20 MB via any application in our website, the site shows a 500 error. The Apache error log will show a similar error:

===
[Fri Jul 08 12:36:14 2011] [warn] [client 91.182.145.210] mod_fcgid: HTTP request length 132356 (so far) exceeds MaxRequestLen (131072), referer: http://www.montenasoft.com/…/upload.html
===

MaxRequestLen from mod_fcgid (and we are running fast cgi for PHP) is limiting request length to only 130kb – If the size of the request body exceeds this amount, the request will fail with 500 Server Error.
Fix is easy you just need to add in your httpd.conf next lines.

===

# 20MB should be enough
MaxRequestLen 20000000

===

We can do this from WHM.

* Login to WHM and go to “Apache Configuration”, and then select “Include Editor”.

* Then in “Pre VirtualHost Include” section select “All versions” add custom MaxRequestLen configuration, and hit update.

* And don’t forget to restart apache on the end.

Now we can upload 20MB files without 500 error.

Advertisements
  1. #1 by Johnc715 on May 17, 2014 - 7:03 PM

    very nice submit, i definitely love this website, keep on it cefagdbagfga

  2. #2 by Johne579 on May 22, 2014 - 4:32 PM

    Thanks for sharing it fddegkfadefa

  3. #3 by Johng655 on May 22, 2014 - 4:32 PM

    Thank you for the auspicious writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! By the way, how could we communicate? ddddadfeggdd

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: