Php form submission solution for massive data loss _ PHP Tutorial

Source: Internet
Author: User
Php forms submit a large amount of data loss solution. 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, I still suspected that the html table had encountered a strange phenomenon recently in the project. there was a large form with thousands of inputs. when I submitted it, I always found that the data from post 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 finally got the solution: the 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 the modification, restart apache and everything is working properly!

Tables table...

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.