500 internal server error while uploading files bigger than 100kb - mod_fcgid problemWhen 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 2013] [warn] [client 91.182.145.210] mod_fcgid: HTTP request length 132356 (so far) exceeds MaxRequestLen (131072), referer: http://www.domain.com/.../upload.htmlMaxRequestLen from mod_fcgid 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 also.
* 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.