我已经修改了php_ini并仍然收到PHP警告POST Content-Length超过了限制 [英] I have modified the php_ini and still get PHP warning POST Content-Length exceed the limit

查看:340
本文介绍了我已经修改了php_ini并仍然收到PHP警告POST Content-Length超过了限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我更改了php.inipost_max_size = 20M;

php -i | grep 'post_max_file' ,post_max_size => 20M => 20M

毕竟,我仍然会收到nginx错误日志:

After all , I still get nginx error log:

在stderr中发送的FastCGI:"PHP消息:PHP警告:9522297字节的POST内容长度超过了第0行中Unknown中的8388608字节的限制",同时从上游读取响应头,客户端:192.168.2.106,服务器:www .hinabian.com,请求:"POST/image/save?editorid = id_content HTTP/1.1",上游:"fastcgi://unix:/var/run/php5-fpm.sock:"

FastCGI sent in stderr: "PHP message: PHP Warning: POST Content-Length of 9522297 bytes exceeds the limit of 8388608 bytes in Unknown on line 0" while reading response header from upstream, client: 192.168.2.106, server: www.hinabian.com, request: "POST /image/save?editorid=id_content HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:"

推荐答案

在我的情况下,我的问题是我在/etc/php/7.3/cli/php.ini而不是在/etc/php/7.3/fpm/php.ini处更新了php.ini.

In my case, my problem was that I'd updated the php.ini at /etc/php/7.3/cli/php.ini instead of at /etc/php/7.3/fpm/php.ini.

(CLI与FPM不同.)

(CLI is not the same as FPM.)

更新FPM php.ini并运行sudo service php7.3-fpm restart后,我的网站运行正常.

My site behaved properly after I updated the FPM php.ini and ran sudo service php7.3-fpm restart.

这篇关于我已经修改了php_ini并仍然收到PHP警告POST Content-Length超过了限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆