Request Entity Too Large – How to fix – Apache, mod_security, php.ini, httpd.conf
I don’t post a lot of tech messages here but few-to-no sites have addressed this particular error correctly so I’m putting it here in hopes someone will benefit from my pain and suffering.
If you see this message:
Request Entity Too Large
The requested resource does not allow request data with POST requests, or the amount of data provided in the request exceeds the capacity limit.
there is a greater-than-not chance that mod_security is the cause.
There will be people who say to edit your php.ini file but that’s not going to help. Edit your apache .conf file(mine’s called httpd.conf but yours could be one of many other names) and look for “SecRequestBodyLimit”, it’ll probably be set around 131072 but could be different. You will either want to increase this number, or potentially remove the option altogether(though I haven’t tested the latter to know if it will help). Restart your apache install and it should be good to go. I don’t necessarily recommend permanently changing this value unless you’re certain you will need it a lot since it will open you to attacks without careful consideration.