Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: PHP Warning: POST Content-Length exceeds the limit  (Read 2319 times)

0 Members and 1 Guest are viewing this topic.

Aby

  • Guest
PHP Warning: POST Content-Length exceeds the limit
« on: December 31, 2013, 06:04:35 am »
Error:

PHP Warning: POST Content-Length of xxxxx bytes exceeds the limit of xxxxxx bytes in Unknown on line 0

You receive the POST Content-Length error message if you exceed the size of the file that is

defined in php.ini file. The file you are uploading from a browser using POST should

havesize less than the post_max_size value defined in the PHP configuration file.

Solution:

In order to upload a larger size file, increase the value of post_max_size variable.

1) Edit the php.ini file. You ca retrieve the path to php.ini using “php -i | grep php.ini”

pico /usr/local/lib/php.ini

2) Search the variable post_max_size. Suppose you need to upload a file of 50M, set the value to 60M.

post_max_size = 60M
upload_max_filesize = 60M

3) Save the file and restart the Apache service.

service httpd restart

That is it. You will now be able to upload the file using POST method.
---