Max_input_vars default value of 1000 in PHP causes multiple form submission failures

Source: Internet
Author: User
Tags php error php error log

Reproduced in: http://54im.com/php-2/php-max-input-vars-default-value-1000-fail-post-form.html

A PHP management system in the company, before running in Apache, and later I transferred to the nginx+php, other functions run normally, there is a modification function submitted after the form did not submit success, checked the code did not find out what the problem, and then read the next PHP error log, There is no clue, after printing the post request, also found that the submission table single number and is not on the table single number pair (at that time suspected is not a plugin is not installed, the character set is right, etc.), and then looked at the next php-fpm log, a bit of information can be consulted.

1 [25-Sep-2014 15:19:30 ] warning: [pool www ] child 28329 said into stderr: notice:php message:php Warning:  unknown:input variables exceeded 1000. < Span class= "CRAYON-CN" > < Span class= "crayon-h" > < Span class= "crayon-h" > to increase the limit change max_input_vars in PHP.ini. In Unknown to line 0 "

The number of input variables is more than 1000, it is recommended to modify max_input_vars,php in the php.ini file to add a variable from 5.3.9 max_input_vars to limit the number of forms submitted.

Damn, I have this feature (similar to the Phpmysqladmin function, reading a database table, then writing to the editor, then the database field has 128, then each field has 11 input boxes) about 1400 more input, (how painful the understanding, for the hair so hanging, Develop a table to engage in so many fields),

And then I joined in PHP.ini.

123 max_execution_time = 300     ; maximum execution Time of each script, in seconds max_input_time = 0 ; Maximum amount of time each script may spend parsing request C20>data max_input_vars =

After restarting the PHP-FPM, the function is OK. It's important to look at the logs.

Max_input_vars default value of 1000 in PHP causes multiple form submission failures

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.