PHP 5.4 500 Internal server error with display_errors turned off

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

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

Which works, however, I get an internal internal server 500 error trying to turn off error display with display_errors. I 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, starting with PHP 5.4, this is a string. How can I set display_errorsto turn off error display?

+5
source share
1 answer

An error code of 500 means that there is an incorrect server configuration. This most likely comes from Apache and not from php.

, , apache.

500, httpd.conf

ErrorDocument 500 " "

apache. , php.ini httpd.conf, apache, .

+4

All Articles