I want to put display_errors off in PHP so visitors dont see errors on a website made by customers in their website.
I think this is a lot safer then showing all those errors on screen to a visitor.
But when I turned it off I found out that customers cant view the errors there self in the cPanel Error Log.
I use PHP 5.20 with phpsuexec
Normally the error part in the php.ini is configured like this:
So my question is if there is any way to show the php errors in the Cpanel Error log and not in the browser when someone visits a website with bad coded PHP?
I think this is a lot safer then showing all those errors on screen to a visitor.
But when I turned it off I found out that customers cant view the errors there self in the cPanel Error Log.
I use PHP 5.20 with phpsuexec
Normally the error part in the php.ini is configured like this:
Code:
; Examples:
;
; - Show all errors, except for notices
;
;error_reporting = E_ALL & ~E_NOTICE
;
; - Show only errors
;
;error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR
;
; - Show all errors except for notices
;
error_reporting = E_ALL & ~E_NOTICE
; Print out errors (as a part of the output). For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below). Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.
display_errors = On
; Even when display_errors is on, errors that occur during PHP's startup
; sequence are not displayed. It's strongly recommended to keep
; display_startup_errors off, except for when debugging.
display_startup_errors = Off
; Log errors into a log file (server-specific log, stderr, or error_log (below))
; As stated above, you're strongly advised to use error logging in place of
; error displaying on production web sites.
log_errors = On ;
; Set maximum length of log_errors. In error_log information about the source is
; added. The default is 1024 and 0 allows to not apply any maximum length at all.
log_errors = On ;
; Do not log repeated messages. Repeated errors must occur in same file on same
; line until ignore_repeated_source is set true.
ignore_repeated_errors = Off
; Ignore source of message when ignoring repeated messages. When this setting
; is On you will not log errors with repeated messages from different files or
; sourcelines.
ignore_repeated_source = Off
...
; Store the last error/warning message in $php_errormsg (boolean).
track_errors = Off