MaxRequestLen : Linux File size upload error

Download PDF

With new version of Linux distros I have noticed a lot of default configurations are set with really low values.

One of them is MaXRequestLen in Fast CGI.

It used to be set to 1Gb by default, with new distro installs its value is 128kb (Ubuntu, CentOS, RedHat, Fedora etc.).

In order to upload files larger then 128kb you will have to do the following:

First obviously make sure your php.ini settings are set first, for example:

upload_max_filesize = 100M
post_max_size = 150M
memory_limit = 128M

Next is to change MaXRequestLen in  /etc/apache2/conf.d/fcgid.conf

FcgidMaxRequestLen 2147483648

This will give you limit of 2Gb file uploads.


Have fun 🙂


0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply