Linux > Plesk

Unable to upload large files via PHP: HTTP request length exceeds MaxRequestLen

(1/1)

rohitj:
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
======================

Navigation

[0] Message Index

Go to full version