-1

I am trying to upload a 400 Mb file from my client browser to my website which fails and gives me the 413 request entity too large error in my console.

Although I am able to upload files till 110 Mb..

in my PHP ini file I have

upload_max_filesize = 5000M

post_max_size = 5000M

Request your help on this.

Regards Tandon

TandonG
  • 13
  • 6
  • 2
    That is most likely an error coming directly from your web server, before PHP even gets involved. https://www.keycdn.com/support/413-request-entity-too-large – 04FS Jan 13 '20 at 14:05
  • Make sure you edited the correct `php.ini` file (the one for your server, not the CLI one). Restart your server after making the changes. Check if your changes have been made using `phpinfo()` – brombeer Jan 13 '20 at 14:05
  • @kerbholz thanks for the idea..i have done the changes and rebooted the server and my phpinfo show upload_max_filesize = 5000M post_max_size = 5000M. I am still unable to figure out as to why this is happening... need help.. – TandonG Jan 13 '20 at 14:16
  • @04FS I have checked the .htaccess file and there's no limit mentioned. – TandonG Jan 13 '20 at 14:52
  • .htaccess is per-directory configuration. A setting like this is probably more likely made on the server configuration or virtual host level. – 04FS Jan 13 '20 at 15:27
  • Does this answer your question? [Apache's limit to POST request size](https://stackoverflow.com/questions/11686288/apaches-limit-to-post-request-size) – Example person Jan 13 '20 at 18:02

1 Answers1

0

This is coming from your webserver, not PHP. Your webserver throws these errors when the request goes to the server, it does not process anything after the error. So, PHP is not involved in this. Check out Apache's limit to POST request size.

Also as @04FS mentioned, also check out https://www.keycdn.com/support/413-request-entity-too-large.

Example person
  • 3,198
  • 3
  • 18
  • 45