Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

max_input_vars set even if commented in php.ini

Tags:

post

php

ini

I have a strange problem in my PHP application. In my php.ini, I have commented out the max_input_vars directive, but when submitting 1-2k forms (I know it's kinda large), the last 200 post values are cut off. The strange thing is that I even restarted my Apache. My phpinfo() shows that limit is set to 1000. Is that the default value? How do I make max_input_vars unlimited?

like image 457
Axxxon Avatar asked May 17 '12 14:05

Axxxon


1 Answers

According to the manual, there is indeed a default value of 1000 for max_input_vars (look in the table at the beginning of the page).

If you want a value different than this default value of 1000, you will have to specify it -- and not comment the directive in your configuration.

As far as I can tell, there is no way to make max_input_vars unlimited ; you could set it to a high enough value, of course, but remember that this directive has been added recently as a security measure. Also, it doesn't make sense to set the max_input_vars to unlimited since then a malicious user could send a huge load of data and exhaust your memory.

like image 121
Pascal MARTIN Avatar answered Sep 28 '22 07:09

Pascal MARTIN