This article is a mirror article of machine translation, please click here to jump to the original article.

View: 11488|Reply: 0

Unknown: Input variables exceeded 1000. To increase the limit change max_inpu...

[Copy link]
Posted on 7/28/2017 9:49:33 AM | | | |
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!




Previous:.NET/C# ActiveMQ operation example [Source code]
Next:Alibaba: Get started with RocketMQ in ten minutes
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com