Page 1 of 1

Obtaining PHP logs?

Posted: 2008/11/05 22:07:38
by jnojr
I have a CentOS 5 system with:

[root@wikisrv-01 wiki]# rpm -q httpd
[root@wikisrv-01 wiki]# rpm -q php

I want to troubleshoot a PHP problem, and am trying to get PHP logs.

In php.ini, I have:

log_errors = On
error_reporting = E_ALL
error_log = /var/log/php.log

I touched /var/log/php.log, chowned it to apache, and restarted httpd But nothing is being written to /var/log/php.log or /var/log/httpd/error_log or anywhere else that I can find. What do I need to do to get PHP logs?

Re: Obtaining PHP logs?

Posted: 2008/11/05 23:44:57
by mickh
Have a look at the apache logs (/var/www/logs/httpd/error_log), I can usually find any PHP errors listed in there.

Update: sorry, I now see you've already looked there!

Re: Obtaining PHP logs?

Posted: 2008/11/06 13:48:52
by saman_artorious
You do not need to modify the error_log option path, just leave the way it is

; Log errors to specified file.
;error_log = filename

all php errors are written to the error_log file in


by default