I copied a site from localhost to AWS server. I can easily upload files in localhost but when I try uploading in the live site it gives me the error

"An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (80 MB) that this server supports."

In php.ini and .htaccess and settings.php I have changed upload_max_filesize to 80MB and post_max_size to 164 MB.

And according to this link, , I also disabled mod_security module in apache.

Here it says, this could be AJAX/Jquery error.

Is there something else that could be the cause for this error?

  • 2
    Note, it should be upload_max_filesize = 80M not upload_max_filesize = 80MB (M vs MB) same with post_max_size Also, check your error logs for e.g suhosin patch error. Sep 17, 2013 at 7:55
  • Too broad to be answered from afar. In the end it's Apache's mod_security. Who knows?
    – leymannx
    Aug 10, 2019 at 10:33

2 Answers 2


Some things that can break file uploads:

  • upload_max_filesize and post_max_size ;
  • memory_limit ;
  • Unwritable tmp directory.
  • I have already tried with increasing upload_max_filesize, post_max_size and memory_limit. I have also given 777 permissions to tmp directory. Still getting the same error. Apr 10, 2013 at 5:33

Try increasing MaxRequestLen to 80MB as well. You will need it done for you by the administrators if you use a shared host environment though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.