Maxrequestlen error while uploading files

Asked

Viewed 47 times

3

I’m working in PHP and doing upload files, when trying to make a upload of 60M get the following error:

mod_fcgid: HTTP request length 16784592 (so far) Exceeds Maxrequestlen (16777216)

I have my configuration file /etc/apache2/mods-available/fcgid.conf thus configured:

... 
FcgidMaxRequestLen 1073741824
MaxRequestLen 1073741824
...

And I have the php.ini with

upload_max_filesize = 2048M
post_max_size = 2048M

I’ve searched everywhere and I can’t find any resolution for that mistake.

1 answer

2


The directive Fcgidmaxrequestlen defines the maximum length of a Request body. According to the documentation of the module this directive has as default 131072 bytes and that before version 2.3.6 this directive had as standard 2GB.

That said you need to reconfigure this value, either directly on the server (httpd.conf) or in the configuration file of your(s) Virtualhosts(s), vhost.conf) with a view, in agreement with a Serverfault stack, such a change cannot be made within the scope of a single .htaccess.

It is also worth noting that these measures are complementary to those relating to the upload of files made in PHP.INI.

  • That’s right @Bruno Augusto, resulted in the change in vhost.conf. Thanks

  • Glad I could help :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.