即使在php.ini中进行了注释,max_input_vars也会设置 [英] max_input_vars set even if commented in php.ini
问题描述
我的PHP应用程序中有一个奇怪的问题.在我的php.ini中,我已注释掉max_input_vars
指令,但是在提交1-2k表单时(我知道它有点大),最后200个post值被截断了.奇怪的是,我什至重新启动了Apache.我的phpinfo()
显示限制设置为1000.这是默认值吗?如何使max_input_vars
不受限制?
根据 手册 ,的确存在max_input_vars
的默认值1000
(在页面开头的表中查找). >
如果您想要一个不同于默认值1000的值,则必须指定它-而不在配置中注释该指令.
据我所知,没有办法使max_input_vars
无限;您当然可以将其设置为足够高的值,但是请记住,该指令最近已作为安全措施添加.另外,将max_input_vars
设置为无限制是没有意义的,因为那样的话,恶意用户可能会发送大量数据并耗尽您的内存.
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?
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.
这篇关于即使在php.ini中进行了注释,max_input_vars也会设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!