Pregunta

I'm trying to debug an issue in a web application that POSTs data to IIS (7.5) which passes it on to a PHP (5.3.5) application (via FastCGI).

The page has a dynamic form which lets the user add new fields, so the number of key-value pairs posted by the page varies (6 new key-value pairs for each row in a table). Some users have gone totally nuts and added a LOT of data, which means that in some cases there are over 1,000 key-value pairs in the POST body.

It looks like either IIS, FastCGI, or PHP is limiting the number of key-value pairs in the POST body. Fiddler tells me that the browser is correctly sending all 1,000+ pairs, but if I use PHP to immediately echo every key in $_POST the list has shrunk. All posted values contain data, but even if they didn't I'm sure the keys shouldn't be dropped.

Googling this issue isn't helping, so hopefully someone will have experience here. To clarify:

  1. re-designing the application may be on the table but only as a last resort
  2. the amount of data being POSTed is still small - the entire request is around 50kb
  3. the magic number seems to be around 1,000 (maybe 1,005, but testing is a bit of a pig so I can't say with complete certainty)

Any thoughts on this would be very much appreciated!

¿Fue útil?

Solución

Eventually the answer came from this thread

PHP's max_input_vars was the problem

Otros consejos

IIS has request limits, found from another post:

Is there a limit to POST over HTTPS for IIS 7?

Seems like you're doing dynamic form. I'll suggest you to have a look at the "Form" in Google Docs and consider updating content of the whole form by parts to server side via AJAX. This will consume more bandwidth and stability of the connection, but it will solve your 1000 or 1005 limits.

Another approach, control user expectation and set an upper bound.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top