[英]info.php shows log_errors is Off but it is set to be On in the php.ini of Loaded Configuration File
PHP info page shows that log_errors
is set Off
even tho I set it On PHP 信息页面显示log_errors
设置为Off
即使我将其设置为 On
in info.php page shows:在 info.php 页面显示:
Loaded Configuration File
-> /etc/php/7.0/apache2/php.ini
Loaded Configuration File
-> /etc/php/7.0/apache2/php.ini
Scan this dir for additional .ini files
-> /etc/php/7.0/apache2/conf.d
Scan this dir for additional .ini files
-> /etc/php/7.0/apache2/conf.d
top portion of altered php.ini file:修改后的 php.ini 文件的顶部:
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
display_errors = On
log_errors = On
error_log = /var/log/php-errors.log
I have tracked the rest of php.ini file and found other log_error reference which I have also set On log_errors = On我跟踪了 php.ini 文件的其余部分,发现了其他 log_error 参考,我也设置了 On log_errors = On
I am not sure if I should use ini_set('display_errors', 1);我不确定是否应该使用 ini_set('display_errors', 1); format in .ini files, I have found answers about this and used everything to test if anything worked but still. .ini 文件中的格式,我找到了关于这个的答案,并使用了一切来测试是否有任何工作但仍然有效。
So what's wrong with config?那么配置有什么问题呢?
Note: yes, I have restarted apache2.注意:是的,我已经重新启动了 apache2。
Using up to date Ubuntu Server x64 16.04 running PHP Version 7.0.13-0ubuntu0.16.04.1使用最新的 Ubuntu Server x64 16.04 运行 PHP 版本 7.0.13-0ubuntu0.16.04.1
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
won't work in ini file.在 ini 文件中不起作用。 to enable error reporting write following line in your ini file要启用错误报告,请在您的 ini 文件中写入以下行
error_reporting = E_ALL error_reporting = E_ALL
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.