Max_input_vars is set even when commenting in php.ini

I have a strange problem in my PHP application. In my php.ini I commented on the max_input_vars directive, but when submitting 1-2k forms (I know it is very large) the last 200 message values ​​are truncated. It is strange that I even restarted my Apache. My phpinfo() shows that the limit is set to 1000. Is this the default value? How to make max_input_vars unlimited?

+6
source share
1 answer

According to the manual , there really is a default value of 1000 for max_input_vars (see the table at the top of the page).

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

As far as I can tell, there is no way to make max_input_vars unlimited; you can set it to a fairly high value, of course, but remember that this directive was recently added as a security measure. In addition, it makes no sense to set max_input_vars unlimited, as a malicious user can send a huge amount of data and run out of memory.

+10
source

Source: https://habr.com/ru/post/915999/


All Articles