问题描述
我将PHP v5.3.8升级到v5.3.24.由于更新我的脚本不再有效.
I upgrade my PHP v5.3.8 to v5.3.24.Since updating my script no longer works.
输入变量POST就是问题.
An input variable POST it's the problem.
在此处形成源代码: http://pastebin.com/N4XKSQjR
以下是线路问题(最后一行):
The line problem is the following (last line):
<input type="hidden" name="count_result" value="416">
在我的PHP处理表单页面(traitement.php)上,我像这样恢复该字段:
On my PHP processing form page (traitement.php) i recover this field like this:
$count_result = $_POST['count_result'];
我得到这个php错误:
And i get this php error :
该脚本在PHP 5.3.8中可以正常工作,但在PHP 5.3.24中则没有问题.
The script works without problems with PHP 5.3.8 but not with PHP 5.3.24.
有人可以帮助我吗?
谢谢
推荐答案
只有我能找到的解决方案,并且基于我在尝试重复问题时遇到的错误.注意,我在PHP 5.4.x上对此进行了测试
错误:
Only solution I've been able to find, and based on the error I get while trying to duplicate the problem. Note, I tested this on PHP 5.4.x
The error:
在我的php.ini
行中:
; max_input_vars = 1000
已被注释掉-表示它默认为1000
. 在5.3.9之前,这不是一个选择 >,因此您没有遇到问题,并且它是无限的^^.在PHP> = 5.3.9的情况下,其默认值为1000
,因此要使您的脚本与众多输入兼容,您需要在PHP中设置该指令.我将其设置为2000,它运行良好.
has been commented out - meaning it was defaulting to 1000
. Prior to 5.3.9, this was not an option, therefore you didn't encounter the problem and it was unlimited ^^. With PHP >=5.3.9 it defaults to 1000
, so to make your script compatible with so many inputs, you need to set that directive in PHP. I set it to 2000 and it worked perfectly.
由于您复制了旧的php.ini,它可能在那里不存在,因此添加:
Since you copied your old php.ini, it probably won't exist in there, so add:
max_input_vars = 2000
在某处,至少对您当前的示例有效. ^^
somewhere in there and it will at least work for your current example. ^^
这篇关于将PHP 5.3.8更新为PHP 5.3.24后无法发布隐藏的输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!