1ini_set('display_errors', '1');
2ini_set('display_startup_errors', '1');
3error_reporting(E_ALL);
1ini_set('display_errors', 1);
2ini_set('display_startup_errors', 1);
3error_reporting(E_ALL);
4
1/* Display all errors like dev */
2ini_set('display_errors', 1);
3ini_set('display_startup_errors', 1);
4error_reporting(E_ALL);
5
6/* Display PROD errors */
7ini_set('display_errors', 1);
8ini_set('display_startup_errors', 0);
9error_reporting(E_ALL & ~E_NOTICE);
10
11/* OTHER SETTINGS*/
12
13// Report simple running errors
14error_reporting(E_ERROR | E_WARNING | E_PARSE);
15
16// Reporting E_NOTICE
17error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
18
19// Report all errors except E_NOTICE
20error_reporting(E_ALL & ~E_NOTICE);
21// For PHP < 5.3
22error_reporting(E_ALL ^ E_NOTICE);
23
24// Report all PHP errors
25error_reporting(E_ALL);
26//or
27error_reporting(-1);
28//or
29error_reporting(0);
1/* Answer to: "php error reporting" */
2
3ini_set('display_errors', 1);
4ini_set('display_startup_errors', 1);
5error_reporting(E_ALL);
6
7/*
8 What do these lines of code do exactly?
9
10 The ini_set function will try to override the configuration found
11 in your PHP ini file.
12
13 The display_errors and display_startup_errors are just two of the
14 directives that are available. The display_errors directive will
15 determine if the errors will be displayed or hidden to the user.
16 Usually, the dispay_errors directive should be turned off after
17 development.
18
19 The display_startup_errors, however, is a separate directive
20 because the display_errors doesn’t handle the errors that will be
21 encountered during PHP’s startup sequence. The list of the
22 directives that can be overridden by the ini_set function is found
23 in the official documentation.
24*/
1//PHP functions
2ini_set('display_errors', 1);
3ini_set('display_startup_errors', 1);
4error_reporting(E_ALL);
5
6//.htaccess
7php_flag display_startup_errors on
8php_flag display_errors on
9php_flag html_errors on
10php_flag log_errors on
11php_value error_log /home/path/public_html/domain/PHP_errors.log
1ini_set('display_errors', 1);
2ini_set('display_startup_errors', 1);
3error_reporting(E_ALL);
4//OR
5ini_set('display_errors', 1);
6ini_set('display_startup_errors', 0);
7error_reporting(E_ALL & ~E_NOTICE);