简体   繁体   English

php-fpm(7.1.6)无法打开display_errors

[英]php-fpm (7.1.6) Doesn't turn on display_errors

System: 系统:
Debian Jessie 德比安·杰西(Debian Jessie)
PHP-FPM 7.1.6 PHP-FPM 7.1.6
Apache 2.4.10 阿帕奇2.4.10
XDebug 2.5.4 XDebug 2.5.4

PHP Won't display Parse and other fatal errors, while my php.ini clearly states display_errors = On . PHP不会显示Parse和其他致命错误,而我的php.ini明确指出display_errors = On On the phpinfo() page, it says display_errors Off . phpinfo()页面上,显示为display_errors Off It parses the correct Ini file and no additional ini files that could have overridden it. 它解析正确的Ini文件,并且没有其他可能覆盖它的ini文件。

error_reporting is set to E_ALL. error_reporting设置为E_ALL。

a grep display_errors of the ini file doesn't show any other setting than it turning on. ini文件的grep display_errors除了打开外没有显示任何其他设置。

Am I missing something? 我想念什么吗?

if display_errors shows On in your php.ini and phpinfo() shows off for the master value then there is definitely a problem somewhere in your configuration files (or a bug in PHP 7.1.6, but that is probably less likely). 如果display_errors在php.ini中显示为On,而phpinfo()显示为master值,则说明配置文件中肯定存在问题(或PHP 7.1.6中的错误,但这不太可能出现)。

It sounds like you've already checked all the details but it is worth double checking. 听起来您已经检查了所有详细信息,但值得再次检查。 In particular this is the list of items I would verify: 特别是这是我要验证的项目列表:

  1. Verify that the php.ini file referenced in your phpinfo() results (under Loaded Configuration File ) matches the actual location of the php.ini file you are editing. 验证phpinfo()结果(位于“ Loaded Configuration File )中引用的php.ini文件是否与您正在编辑的php.ini文件的实际位置匹配。 Some systems might have more than one and I've been fooled by that before. 某些系统可能有多个,而我之前对此一直感到迷惑。
  2. Also make sure and grep the directory specified by Scan this dir for additional .ini files . 还要确保并grep“ Scan this dir for additional .ini files目录”指定的Scan this dir for additional .ini files If a file in there sets the display_errors directive (unlikely but possible) it will override anything in your php.ini file. 如果其中的文件设置了display_errors指令(不太可能但可能),它将覆盖php.ini文件中的所有内容。
  3. Check for configuration directives in .htaccess files. 检查.htaccess文件中的配置指令。 These can also set the display_errors value. 这些还可以设置display_errors值。 I'm pretty sure that when they do so they set the local value, not the master value, but I'm not 100%: it wouldn't hurt to check. 我很确定他们这样做时会设置本地值,而不是主值,但我不是100%:检查不会有什么坏处。 (although this probably doesn't apply to PHP-FPM, so I guess I'm just mentioning this for completeness). (尽管这可能不适用于PHP-FPM,所以我想我只是为了完整性而提到它)。
  4. I know it is silly, but just double check that your display_errors = On line isn't commented out. 我知道这很愚蠢,但是请仔细检查一下,您的display_errors = On line是否已被注释掉。

I'm not aware of any other places that PHP configuration options might be set, but it could be that there are more obscure ones out there: a quick search for setting php.ini values via (system) environment variables didn't show up anything. 我不知道可能在其他任何地方设置了PHP配置选项,但可能还有更多晦涩的地方:通过(系统)环境变量快速搜索设置php.ini值的操作没有显示任何东西。 That would be a good way to override settings without realizing it. 那将是在没有意识到的情况下覆盖设置的好方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM