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

时间:2015-02-12 02:43:53

标签: php linux amazon-ec2 error-logging error-log

我在我的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/ ......但即使这样也没有帮助

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

1 个答案:

答案 0 :(得分:0)

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

我见过EC2用户有像/etc/php5/apache2/php.ini

这样的php.ini位置

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

相关问题