PHP Limit form submission function Max_input_vars default value 1000

Source: Internet
Author: User

The Forum for the operation of the company was attacked by the network helpless do not have a very good solution, only one of the IP address, the final closure of more than 1600 IP segment, 2 months after the network attacks gradually reduced, fearing will block normal users, so began to solve a group of domestic IP address of the field, the Forum program is Discuz, Because Discuz does not have paging functionality on the Banned IP field page, it causes more than 1600 fields to be read on the page at the same time.

The problem is, delete the IP field when the program does not respond, in the record number of 1000 or more, whether it is to submit a delete record, or all delete records, are ineffective.

1000 records, delete function failed

Finally, with the help of Discuz official forum administrator to solve!

Discuz official

Solution: Join in PHP.ini

Max_input_vars, refers to the number of representations submitted, the default value is 1000. The official addition of this variable is intended to better protect the server from attack. Avoid clogging.

Max_input_vars = 2000

Instance code:

Max_execution_time = 30; Maximum execution time of each script, in seconds
Max_input_time = 60; Maximum amount of time each script may spend parsing request data
Max_input_vars = 2000

After restarting the PHP-FPM, the function is normal.

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.