Jump to content

Recommended Posts

Just use php's built in error logging to do this for you -

log_errors boolean

Tells whether script error messages should be logged to the server's error log or error_log.

 

Note: You're strongly advised to use error logging in place of error displaying on production web sites.

error_log string

Name of the file where script errors should be logged.

 

You would set error_reporting to E_ALL, display_errors to OFF, log_errors to ON, and error_log to the file you want to use.

 

If your web sit is functional, the file system will be operational and you will be able to write to a log file. The same is not true of a database. The database server might be experiencing problems, which is causing the errors you would like to see and trying to log the resulting errors to the database won't work.

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.