简体   繁体   中英

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

i am running php 5.5.20 in my amazon ec2 linux box. I have done the following in the terminal

[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

Note that the error_log directive is not commented out. However, i am facing errors (namely 404 errors, PDO errors etc) in my website but the php_errors.log file is not even being created.

I also tried chmod 777 /var/log/httpd/ as well... but even that didn't help

I also checked that log_errors directive is set to On in php.ini settings

Make sure you are editing the correct file.

I've seen EC2 users have php.ini locations like /etc/php5/apache2/php.ini

You could also try locate php.ini in your shell.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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