Hi all,
This is on ArchLinux
Quote:
fukawi2 ~ $ php --version
PHP 5.2.6 with Suhosin-Patch 0.9.6.2 (cli) (built: May 1 2008 21:14:36)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
fukawi2 ~ $ syslog-ng --version
syslog-ng 2.0.9
|
Having a problem with PHP on Apache and not being able to get logs out. My php.ini is logging to syslog:
Code:
root ~ # grep '^error_log' /etc/php/php.ini
error_log = syslog
root ~ #
And syslog-ng is setup as so:
Code:
root ~ # grep php /etc/syslog-ng.conf
destination php { file("/var/log/php.log"); };
filter f_php { program("^php"); };
log { source(src); filter(f_php); destination(php); };
root ~ #
I've also tried replacing
program("^php"); with
match("php"); but to no avail
I have a test page on my webserver which should throw an error:
root ~ # cat /home/fukawi2/public_html/test.php
Code:
<?php
echo "Moo"
?>
(No ; to end the echo statement)
When I access this page via my web browser, it prints "Moo", but no error is written to /var/log/php.log
PHP is setup to log everything:
Code:
root ~ # egrep '^error_reporting |^log_errors ' /etc/php/php.ini
error_reporting = E_ALL
log_errors = On
root ~ #
EDIT:
It actually seems to be a problem with PHP:
Code:
root ~ # grep "^error_log" /etc/php/php.ini
error_log = /tmp/php.log
root ~ # touch /tmp/php.log
root ~ # chmod 777 /tmp/php.log
root ~ # /etc/rc.d/httpd restart
:: Stopping HTTP Daemon [DONE]
:: Starting HTTP Daemon [DONE]
root ~ #
I then accessed my test error page, but....
Code:
root ~ # cat /tmp/php.log
root ~ #