Works for me. How log all php errors to a log fiie?
Just add following line to /etc/php.ini to log errors to specified file – /var/log/php-scripts.log
vi /etc/php.ini
Modify error_log directive
error_log = /var/log/php-scripts.log
Make sure display_errors set to Off (no errors to end users)
display_errors = Off
Save and close the file. Restart web server:
/etc/init.d/httpd restart
How do I log errors to syslog or Windows Server Event Log?
Modify error_log as follows :
error_log = syslog
How see logs?
Login using ssh or download a log file /var/log/php-scripts.log using sftp:
$ sudo tail -f /var/log/php-scripts.log