Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To display PHP errors on syslog, you can use the following code:

  1. Open the php.ini file using a text editor.

  2. Find the error_log directive and set it to syslog.

  3. Find the errorreporting directive and set it to EALL | E_STRICT.

  4. Save the changes and restart the web server.

  5. Check the syslog file for PHP error messages.

Here is an example of the code:

; Log errors to syslog
error_log = syslog

; Report all errors except E_NOTICE
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT

Note: This method may not work on all operating systems or configurations. Check your system documentation for more information on how to set up logging to syslog.