Solution to incomplete post data in php5.3.9 _ PHP Tutorial

Source: Internet
Author: User
The post data in php5.3.9 is incomplete. A max_input_vars variable is added to php5.3.9. if the data submitted by your post exceeds the max_input_vars value, some data will be lost. Recently, in the project, a max_input_vars variable is added to the strange php5.3.9. if the data submitted by your post exceeds the max_input_vars value, some data will be lost.

Recently, there was a strange phenomenon in the project. there was a large form with thousands of inputs. when submitting the form, it was always found that the post data was incomplete, at the beginning, it was suspected that the html form name had a conflict and was removed.

Then, I found a bunch of php files online. the post_max_size and upload_max_filesize values of ini are set to a large value, which is useless. the client_max_body_size of nginx is 500 m. It is useless to add such a large value.

Finally, google found the solution:

In the past, a variable max_input_vars was added in PHP from 5.3.9 to limit the number of submitted forms.

This value is 1000 by default and cannot meet the requirements of more than 1000 input items. Therefore, you must add a larger value in php. ini, for example:

Max_input_vars = 5000. after modification, restart php and everything will work properly!

Max_input_vars variable. if the data submitted by post exceeds the max_input_vars value, some data will be lost. A strange appearance occurred recently in the project...

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.