繁体   English   中英

即使在php.ini中定义了error_log,也没有php错误文件

[英]no php error file even though error_log is defined in php.ini

我在我的amazon ec2 linux盒子里运行php 5.5.20。 我在终端上做了以下的事情

[root]# cat /etc/php.ini | grep error_log

; server-specific log, STDERR, or a location specified by the error_log
; Set maximum length of log_errors. In error_log information about the source is
;error_log = php_errors.log
;error_log = syslog
error_log = /var/log/httpd/php_errors.log

请注意, error_log指令未被注释掉。 但是,我在我的网站中遇到错误(即404错误,PDO错误等),但是甚至没有创建php_errors.log文件。

我也试过chmod 777 /var/log/httpd/ ...但即使这样也无济于事

我还检查了在php.ini设置中log_errors指令设置为On

确保您正在编辑正确的文件。

我见过EC2用户有像/etc/php5/apache2/php.ini这样的php.ini位置

您也可以尝试在shell中locate php.ini

暂无
暂无

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

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