Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»General Articles»How to Enable PHP errors to Display on Web Browser

    How to Enable PHP errors to Display on Web Browser

    By RahulFebruary 18, 20191 Min Read

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

    Advertisement

    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.

    1
    2
    3
    4
    5
    <?php
     
    ini_set('display_errors', 1);
    ini_set('display_startup_errors', 1);
    error_reporting(E_ALL);

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

    Enable PHP Errors

    error logging PHP
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    A Comprehensive Look at the Simple Mail Transfer Protocol (SMTP)

    Setting Up Permissions in Home Directory on Linux

    Configuring Apache Userdir on Ubuntu and Debian: A Simplified Guide

    View 1 Comment

    1 Comment

    1. PARDEEP on July 10, 2019 9:49 am

      500 Error, please check your php script / enable display_errors in your cpanel

      Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • A Comprehensive Look at the Simple Mail Transfer Protocol (SMTP)
    • Understanding Basic Git Workflow: Add, Commit, Push
    • The Difference Between Git Reset –soft, –mixed, and –hard
    • Understanding the Staging Area in Git’s Workflow
    • Python Function with Parameters, Return and Data Types
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.