Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

luisrenelopez's avatar

413 (Payload Too Large)

Hi, Im trying to upload some videos to the server, but i get this error in the browser console:

+++ POST 413 (Payload Too Large) ***

and also this error directly by php:

**** POST Content-Length of 60051073 bytes exceeds the limit of 8388608 bytes. ***

I already configured php.init by setting;

post_max_size = 200M &

upload_max_filesize = 100M.

But it does not work yet

thanks for reading

0 likes
2 replies
a4ashraf's avatar

@luis100079 try this

8388608 bytes is 8M, the default limit in PHP. Update your post_max_size in php.ini to a larger value.

upload_max_filesize sets the max file size that a user can upload while post_max_size sets the maximum amount of data that can be sent via a POST in a form.

So you can set upload_max_filesize to 1 meg, which will mean that the biggest single file a user can upload is 1 megabyte, but they could upload 5 of them at once if the post_max_size was set to 5.

luisrenelopez's avatar
luisrenelopez
OP
Best Answer
Level 1

This is crazy.

I had to configure also the cli/php.ini file (/etc/php/7.2/cli/php.ini). I did the same configuration there. solved

Please or to participate in this conversation.