【问题标题】:error_reporting from script -> nginx+php-fpm来自脚本的错误报告 -> nginx+php-fpm
【发布时间】:2013-12-02 23:12:05
【问题描述】:

我正在使用 nginx+php-fpm。我无法通过这样的 php 文件设置错误显示: error_reporting(0);ini_set('error_reporting', E_ALL);

工作解决方案是通过 nginx.conf: fastcgi_param PHP_VALUE "upload_max_filesize = 1000M \n post_max_size=1010M \n display_errors = On";

但我需要通过 php-script :-)。可能吗?谢谢。

【问题讨论】:

  • 为什么不能使用ini_set?
  • 在 php-fpm.conf 中?因为我只对某些虚拟主机需要这个。
  • 您可以在您的虚拟主机脚本中使用 ini_set。
  • 对我来说这行不通。看我的原帖。使用池时我可以在 php-fpm.con 中设置php_flag,但我需要在 php-script 中。

标签: php nginx fastcgi


【解决方案1】:

试试

error_reporting(E_ALL);
ini_set('display_errors','on');

PS: 0 不是用于错误报告的有效值,predefined constants 用于此

【讨论】:

    猜你喜欢
    • 2013-09-28
    • 1970-01-01
    • 1970-01-01
    • 2013-02-13
    • 2014-04-24
    • 2013-08-12
    • 2023-03-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多