In the php.ini file you can read:
Quote:; 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 = Off
The values above are from the default php.ini created for hosted domains (fcgi) and the default php.ini installed by the libapache2-mod-php package. IMHO we should disable the
display_errors directive and enable
log_errors as it is
strongly encouraged. There will be much more php error info in the logs then
ispcomm Wrote:I think the best solution is to forse a user to use the php hooks (http://www.php.net/errorfunc) if required (for debugging on remote server).
The problem with this approach is that startup errors cannot be "hooked", because they don't allow the script to run, and the hooking is (not) done during it's execution. One example of such errors is a missing require (trivial to fix if you can see the error, nearly impossible if you don't)...