Are you getting PHP Warning: POST Content-Length of 8978294 bytes exceeds ?

This is the warning shown if the content length exceeds 8 Mb of size. 8978294 bytes is approximately 8 Mb. In php.ini file, the default values are set to allow content length not more then 8 Mb.

There is a variable in php.ini called post_max_size. If you increase it to 120 M which is 8 M by default, then you will not see the warning anymore. You can also change upload_max_filesize from 2 M to the appropriate size, if this values is set to 100M then user will be able to upload file of maximum 100 MB

// in php.ini change these variables

post_max_size = 100M
upload_max_filesize = 100M

If you have changed that in your php.ini file then you will notice that your warning has disappeared. If you are still getting this warning or got any code suggestion and queries then feel free to comment below.


Sahil Ahlawat

I am a Sr. Web Developer passionate about blogging and teaching. When I am not coding or writing blogs, I prefer traveling (Which I like most). I am also doing a bit or research on Indian Startups now a days.

Leave a Reply

Your email address will not be published. Required fields are marked *