James Walker James Walker - 1 month ago 10
PHP Question

413 Request Entity Too Large Ajax Upload

I have a script which will upload files to the server via Ajax. After 30 seconds I get a

413 Request Entity Too Large
error. I have changed the common culprits but the timeout after 30 seconds is quite puzzling. The file in question is 94.9MB in size.

php.ini
max_input_time 60
max_execution_time 60
upload_max_filesize 100M
post_max_size 100M

httpd.conf
Timeout 60

Answer

After a check of the access logs I found the setting I needed to change in mod security

/etc/httpd/conf.d/mod_security.conf

I changed the SecRequestBodyLimit to 104857600 (100mb) and I am now able to upload my file.

Comments