Home > Backend Development > PHP Tutorial > PHP large form uses post method to transmit data packet loss problem

PHP large form uses post method to transmit data packet loss problem

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-25 09:05:36
Original
1931 people have browsed it
In the production environment, a huge form includes three pictures, hundreds of input boxes, and nearly a thousand checkboxes. When submitted to the background using the post method, the data is cut off.

In the production environment, a huge form includes three pictures, hundreds of input boxes, and nearly a thousand checkboxes. When submitted to the background using the post method, the data is truncated. After debugging all the way, I found that when PHP got $_POST, the data was insufficient. At first I thought it was a problem with post_max_size and upload_max_size in PHP, but setting it to 100M didn't work either. Later, I thought it was a problem with limitpostdate in Apache, and it didn't work even if I set it too high. Later, I installed wireShark on the client to capture packets, and found that TCP WINDOWS FULL appeared in the middle of the tcp packet, so I thought it was because the browser did not correctly transmit the total package size during the second TCP handshake. Until the end, I found the following error in Apache’s error.log: PHP Warning: Unknown: Input variables exceeded 1000 It turns out that the default number of parameters in a post in PHP is 1000, and the excess will be automatically thrown away.

Adjust this value, for example, we set it to 2000: Set in PHP.ini max_input_vars = 2000



source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template