PHP error reporting can be simple or difficult depending upon your application. Many sites and applications change the settings, either via the php.ini file, an .htaccess file, or directly in the PHP code. In fact, setting the values directly in the PHP code of your application is probably the most common method.
So which settings are you actually supposed to change? Try these for starters:
- error_reporting
- display_errors
- log_errors
The following example contains the syntax:
ini_set('error_reporting', E_ALL & ~E_NOTICE);
ini_set('display_errors', 0);
ini_set('log_errors', 1);
(more…)