【问题标题】:PHP E_WARNING Input variables exceeded not displayedPHP E_WARNING 超出输入变量不显示
【发布时间】:2013-04-23 13:15:45
【问题描述】:

我的 PHP 5.3.24 有问题。 我的 PHP 没有在我的脚本中显示 E_WARNING 消息。

我想出现以下错误:

警告:未知:输入变量超过 1000

在我的设置中,这个错误在它应该出现的时候并没有出现。 这是我的 php.ini 文件:http://pastebin.com/iC7yQ2bm

遵循以下讨论:Cannot post hidden input after update PHP 5.3.8 to PHP 5.3.24

感谢您的帮助

【问题讨论】:

  • 您确定没有覆盖您的 php 文件中的设置吗?我看到你在你的 php.ini 中设置了很好的价值,试着把 error_reporting(E_ALL);就在您希望给出错误的行之前
  • 我的php文件:<?php $count_result = $_POST['count_result']; var_dump($count_result, $_POST); ?>
  • 你的操作系统是什么?至少在我的 Ubuntu 安装中,由于 ini 文件中的错误,我遇到了同样的问题
  • Windows Server 2008 R2 (Apache 2.2.21)
  • @barbuslex 您的 php.ini 文件看起来不错 - 我的意思是没有错误。但是您是否在进行更改后重新启动了 Web 服务器?如果没有,请立即执行并重新测试。

标签: php post warnings


【解决方案1】:

http://www.php.net/manual/en/errorfunc.configuration.php#ini.display-startup-errors

在你的 php.ini/htaccess 中

display_startup_errors = On

或者您可能需要更多...

error_reporting = -1
display_errors = On
display_startup_errors = On

遗憾的是,您只能打印或不打印它

【讨论】:

  • 也不工作。我的 .htaccess 文件:php_value max_input_vars 1 php_flag display_startup_errors On php_value error_reporting -1 php_flag display_errors On php_flag display_startup_errors On
  • 可能您不允许从 htaccess 更改这些值...运行 phpinfo() 并查看值是否设置正确
【解决方案2】:

把它放在你的php文件的第一行

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);

如果它没有显示错误,则表示没有错误。

此外,检查 -> http://php.net/manual/en/errorfunc.configuration.php http://www.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting

【讨论】:

  • 不工作。我在我的 traitement.php 中设置了这些行,我没有Warning: Unknown: Input variables exceeded 1000,但我没有得到'count_result' post 变量。 (显示此帖子stackoverflow.com/questions/16165713/…
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2021-12-05
  • 1970-01-01
  • 1970-01-01
  • 2015-06-21
  • 2012-03-29
  • 1970-01-01
  • 2021-06-20
相关资源
最近更新 更多