记录日常工作关于系统运维,虚拟化云计算,数据库,网络安全等各方面问题。

Apache PHP Server Issue : Warning: POST Content-Length exceeding the limit


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 when a file greater than the size defined in the php.ini file is uploaded via the browser.

The file you are uploading using the POST method should not exceed the value of post_max_size defined in php.ini file. If it does, it results in the above error message.

Solution:
In case you are looking to upload a larger file size, you need to increase the value of “post_max_size” in php.ini.

1) To locate the exact php.ini file, your PHP is using

    php -i | grep php.ini

2) Edit the php configuration file

    pico /usr/local/lib/php.ini

3) If you are looking to upload a file of 30M, set post_max_size and to upload_max_filesize to 40M.

    post_max_size = 40M
    upload_max_filesize = 40M 

4) Save the file and restart the httpd service

    service httpd restart


change values in php.ini to:

upload_max_filesize = 2000M
post_max_size = 2000M
max_execution_time = 120
max_file_uploads = 7
memory_limit=128M



转载请标明出处【Apache PHP 报错 : Warning: POST Content-Length exceeding the limit】。

《www.micoder.cc》 虚拟化云计算,系统运维,安全技术服务.

网站已经关闭评论