2017/07/28 09:17:56 [error] 2488#0: *460868 FastCGI sent in stderr: "PHP message: PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0" while reading response header from upstream, client: 1.1.1.1, server:www.itsvse.com, request: "POST /admin.php HTTP/1.0", upstream: "fastcgi://127.0.0.1:9000", host: "www.itsvse.com", referrer: "http://www.it.com/xxx"
A problem that appears in the php error log
The error report is still very friendly, it should be the display of the maximum number of posts, up to 1000 messages
Others on the Internet have also encountered it
Some time ago, I participated in the development of an APP API, one of which is to send the client's address book through JSON, POST request API, at the beginning of the test did not find any problems, and then a customer tested the uploaded data incomplete, reporting an abnormal error. Later, I checked the logs and found that the data received by POST was incomplete. Regardless of whether 1,000 or 2,000 are passed at a time, only more than 300 records are displayed in the log.
After an afternoon of tossing, I finally found that the JSON packet that was posted was truncated by PHP by default. The reason is related to a parameter. php.ini max_input_vars in the file. This is a variable that has been added since PHP 5.3.9.
max_input_vars, refers to the number of commits that are expressed, with a default value of 1000. The official purpose of adding this variable is to better protect the server from attacks. Avoid clogging.
After modifying, you need to modify and restart php-fpm
service php-fpm stop
service php-fpm start
After restarting php-fpm, the max_input_vars will take effect, is the problem solved? Solution, modify php.ini max_input_vars parameters, and then restart to solve the problem!
|