虚拟化容器,大数据,DBA,中间件,监控。

Apache PHP 报错 : Warning: POST Content-Length exceeding the limit

17 01月
作者:admin|分类:系统运维

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

浏览2435 评论0
返回
目录
返回
首页
centos下安装php的ZipArchive扩展 阿里云Linux系统使用KVM/qemu安装routeos