Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Unable to upload large files via PHP: HTTP request length exceeds MaxRequestLen  (Read 3214 times)

0 Members and 1 Guest are viewing this topic.

rohitj

  • Guest
mod_fcgid: HTTP request length ... (so far) exceeds MaxRequestLen (131072)



When using PHP as FastCGI, if you try to upload a file larger than 128KB, the below error occurs and causes a 550 internal server error:

mod_fcgid: HTTP request length ... (so far) exceeds MaxRequestLen (131072)

Cause
The FcgidMaxRequestLen directive was changed from 1GB to 128KB in the mod_fcgid package, causing the limit to be triggered in many cases (source).

Solution


1) Try to increase the the paramenter value 'FcgidMaxRequestLen' in /etc/httpd/conf.d/fcgid.conf . If this parameter is not present, Add this parameter and set a value which is larger than 131072.
2) If the above steps didn't fix the issue, try the follwing one.

======================

1. Change the value of MaxRequestLen in domainVirtualHost.php template.

Important: Do not change the default template. To introduce your changes to the configuration, copy the  /usr/local/psa/admin/conf/templates/default/domain/domainVirtualHost.php file to the /usr/local/psa/admin/conf/templates/custom/domain directory and then modify the copied file.

2. Reconfigure domains:
/usr/local/psa/admin/bin/httpdmng --reconfigure-all
======================