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/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
- Â
- Â
Â
 AddHandler fcgid-script .fcgi
Â
 FcgidConnectTimeout 20
Â
MaxRequestLen 15728640
Â
-> $ service httpd restart
Â