Wednesday, 14 August 2013

max_input_vars and serialized data

max_input_vars and serialized data

I have a huge number of input elements on page which should be submitted
to server via ajax.
I've created an array and were trying to send it, but I've got a php
warning "*your PHP configuration limits the maximum number of fields to
post in a form: 1000 for max_input_vars*"
So, I decided to bypass this warning and modify all my huge array into a
serialized string. As a result - warning disappear, but I steel getting
truncated data on server side.
P.S. In both cases problem can be solved via increasing max_input_vars
variable.
Why does restriction of "max_input_vars" applied to only one variable in
POST and truncate it data(huge string)?

No comments:

Post a Comment