Posted By

apphp-snippets on 07/27/14


error htaccess log

Versions (?)

Error Logging in .htaccess

 / Published in: Bash


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.

  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  

You need to login to post a comment.