Redirecting PHP error messages into a log file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hello,

I'm using CentOS release 5.5 x86_64 with the stock php-5.1.6-27.el5
and would like to redirect PHP messages into /var/log/httpd/php_log

First I tried adding that file name to /etc/php.ini:
error_log = "/var/log/httpd/php_log"
and restarted httpd, but the file didn't appear.
I've touched it and changed owner to apache.apache,
but that didn't help.

Then I've changed that line to error_log = syslog
and now I get the messages in /var/log/messages:

Jul 29 21:29:24 hXXX httpd: PHP Notice:
    Undefined index:  REMOTE_ADDR in
/var/www/html/odnoklassniki/index.php on line 44
Jul 29 21:29:45 hXXX httpd: PHP Parse error:
    syntax error, unexpected '[' in
/var/www/html/odnoklassniki/index.php on line 44

I still would like to move those message to a separate file
though, so I've added the following line to /etc/syslog.conf
and reloaded syslogd service:

httpd.*                                                 /var/log/httpd/php_log

but the file is still empty. Any hints please?

Thank you
Alex

--
http://preferans.de
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux