Error Logging in .htaccess

/ Published in: Bash
Save to your folder(s)

This example shows you how to log errors to a file, and prevent showing them to the user. Make sure that the file exists and you're able to write to it.

Copy this code and paste it in your HTML
  1. # display no errs to user
  2. php_flag display_startup_errors off
  3. php_flag display_errors off
  4. php_flag html_errors off
  5. # log to file
  6. php_flag log_errors on
  7. php_value error_log /location/to/php_error.log


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.