Friday 9 March 2012

modfcgid: MaxRequestLen

Issue:

Unable to upload files in Joomla, Wordpress etc:

 $ tail -f /usr/local/apache/logs/error_log |grep domianname.com
[Thu Oct 06 12:57:28 2011] [warn] [client 203.197.151.138] mod_fcgid: HTTP request length 131274 (so far) exceeds MaxRequestLen (131072), referer:
http://domainname.com/wp-admin/media-new.php?flash=0                                                                             
[Thu Oct 06 12:57:28 2011] [error] [client 203.197.151.138] File does not
exist: /home/domain/public_html/500.shtml, referer:
http://
domainname.com/wp-admin/media-new.php?flash=0


Fix:

Find the FCGI PHP configuration file for the domain under concern. Usually it is /usr/local/apache/etc/userdata/std/2/<username>/<domainname>/phpini.conf
Add line "MaxRequestLen 15728640" inside the configuration file. Restart Apache
 
For this domain, the fix was:
-> $ vi /usr/local/apache/etc/userdata/std/2/domian/domainname.com/phpini.conf
-> Modify the contents to as follows:
Code: Select all
 
 <IfModule mod_fcgid.c> 
 AddHandler fcgid-script .fcgi 
 FcgidConnectTimeout 20 
MaxRequestLen 15728640 
</IfModule>
-> $ service httpd restart
 

No comments: