Skip to content

How to Enable PHP errors to Display on Web Browser

Category
PHP
Versions & support
About PHP →

This tutorial will help you to enable PHP errors to display on the web browser. This is helpful for debugging purpose.

First of all, enable display_errors parameter in your php.ini configuration file.

display_errors = on

Then, add the following code to your the application PHP script. For example, add this code to your index.php or other default load script.

Here is a sample index.php with enabled error to display on browser.

Enable PHP Errors

Rahul

Rahul Kumar is the founder and chief editor of TecAdmin.net. A Red Hat Certified Engineer (RHCE), he has worked in IT since 2009, with hands-on experience in Linux system administration, DevOps, web hosting, cloud platforms and automation. He started TecAdmin in 2013 to share practical, step-by-step guides, and leads its editorial work with one aim: making technical learning clear and useful for sysadmins, developers and beginners alike.

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *


Back to top