Welcome to Snipped, a code gallery for creating, saving and sharing all kinds of code snippets.

PHP Error Logging

htaccess · February 16, 2017 6:44 pm

0 0 92

Log errors to a file, and prevent showing them to the user. Make sure that the file exists and your able to write to it.

# display no errs to user
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
# log to file
php_flag log_errors on
php_value error_log /location/to/php_error.log

Discuss this Snip
    No Discussion Comments found.

    You must be Signed In to discuss this Snip
Snipped

Snipped

Joined on
February 16, 2017

  • 9 Snips
    Contributed
  • 0 Likes
    Given
  • 0 Comments Posted
Snip Tags
Get Social And Share

Manage and share all of your code snippets in one easy place.