{"id":11872,"date":"2022-02-07T22:17:14","date_gmt":"2022-02-08T03:17:14","guid":{"rendered":"http:\/\/local.brightwhiz\/?post_type=snippets&p=11872"},"modified":"2022-02-07T22:17:15","modified_gmt":"2022-02-08T03:17:15","slug":"how-to-configure-php-display-errors","status":"publish","type":"snippets","link":"http:\/\/local.brightwhiz\/snippets\/how-to-configure-php-display-errors\/","title":{"rendered":"How to Configure PHP Display Errors"},"content":{"rendered":"\n
Add these lines at the top of your PHP script file:<\/p>\n\n\n\n
ini_set('display_errors', 1);\nini_set('display_startup_errors', 1);\nerror_reporting(E_ALL);<\/code><\/pre>\n\n\n\nThe above enables the display of PHP errors including startup errors as well as reporting all errors, warnings, and notices. <\/p>\n\n\n\n
Configure PHP Display Errors Using .htaccess by adding these lines:<\/p>\n\n\n\n
php_flag display_startup_errors on\nphp_flag display_errors on\nphp_flag html_errors on\nphp_flag log_errors on\nphp_value error_log \/home\/path\/public_html\/domain\/PHP_errors.log<\/code><\/pre>\n\n\n\n<\/p>\n","protected":false},"comment_status":"open","ping_status":"closed","template":"","meta":[],"categories":[953,15],"tags":[954,58,452,471],"yoast_head":"\n
How to Configure PHP Display Errors<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n