Ask Your Question
2

What is the method for displaying PHP errors on syslog?

asked 2023-05-09 18:57:24 +0000

nofretete gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-05-09 19:06:01 +0000

lalupa gravatar image

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.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-09 18:57:24 +0000

Seen: 9 times

Last updated: May 09 '23