Reputation: 3759
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:
Any thoughts on this would be very much appreciated!
Upvotes: 1
Views: 973
Reputation: 3759
Eventually the answer came from this thread
PHP's max_input_vars
was the problem
Upvotes: 3
Reputation: 1808
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.
Upvotes: 0