2016-04-21 101 views
-1

我有2个不同的web应用程序在2个独立的服务器,
服务器1“abc”web应用程序有超过2000记录在db中,而具有“123”web应用程序的服务器2只有1000+记录。
但服务器2中只有“123”出现此警告:输入变量超过1000,有谁知道原因?首先感谢。
有没有解决max_input_vars超过1000问题的选项?
我问,因为有人不建议在php.ini中更改它
而且我相信我的db记录在将来会不断增加,认为max_input_vars的数目不能正确改变吗?php:max_input_vars超过1000

+0

你的代码是什么样的,或者你想达到什么目的? –

+0

该页面至少有2个XHR生成2个下拉列表,每个页面有300个数据。也有窗口负载很少的功能。现在我意识到也许这是我的问题.. –

回答

0

这与数据记录数无关,而与您发送到服务器的数据大小有关。

下面是什么手册说:

How many input variables may be accepted (limit is applied to $_GET, $_POST and $_COOKIE superglobal separately). Use of this directive mitigates the possibility of denial of service attacks which use hash collisions. If there are more input variables than specified by this directive, an E_WARNING is issued, and further input variables are truncated from the request.

如果你不想更新php.ini文件,你可以尝试使用的.htaccess:

php_value max_input_vars 10000 
+0

谢谢。 是否意味着我的编码方法可能会导致太多的数据输入? –

+0

通常是与编码有关的服务器配置相关问题。你使用suhosin还是一些安全的安装? – raidenace

+0

ermm ..我不知道我在用什么..我只用于上传文件。我认为是Centos,EPEL –