PHP 5.4 turn display_errors off php.ini

Posted by Ethan H on Stack Overflow See other posts from Stack Overflow or by Ethan H
Published on 2012-09-09T03:34:53Z Indexed on 2012/09/09 3:37 UTC
Read the original article Hit count: 356

Filed under:
|

I need PHP errors not to be displayed but logged. I am using PHP 5.4 My current code to log errors in my php.ini is:

log_errors = 1
error_log = "/path-to-file/error_log.txt"

Which works however I am getting a 500 internal server error trying to turn error displaying off using display_errors. I have tried using the following, all returning 500 errors.

display_errors = 0
display_errors = "0"
display_errors = false
display_errors = "false"
display_errors = Off
display_errors = "Off"

According to the PHP documentation, as of PHP 5.4, it is a string. What am I suppose to set display_errors to to turn error displaying off?

© Stack Overflow or respective owner

Related posts about php

Related posts about php.ini