How to Enable Debug in PHP

Debugging is a helpful tool that helps developers identify bugs in their code.
Debugging also helps them find errors and bugs in their code before releasing it to the public.
Debugging, however, is an advanced feature of PHP that is only available to developers.
When enabled, PHP displays debugging information in your PHP source code, which anyone can see.
This can often result in sensitive information being leaked, which is why PHP developers usually disable this feature before releasing their code.

  • The debug mode in PHP is useful for troubleshooting and diagnosing problems.
  • You can enable debug mode in PHP by following our step-by-step guide below.

PC problems? Solve them in minutes.

  • 1. Download and install ASR Pro
  • 2. Run a scan to find and fix errors
  • 3. Reboot your computer for the changes to take effect
  • Get better performance from your computer with this software - download it to fix your PC today.

    Enable Debug in PHP 5.6

    1. Go to phpinfo(); in your browser
    2. Look for the line “display_errors”
      Look for the line
    3. If it is not enabled, enable it
    4. Run the PHP file again

    Enable Debug in PHP 7

    1. Open a command line.
    2. Type php -v, and then hit the Return key.
      Type php -v, and then hit the Return key.
    3. Next, change the 7 to 5.
    4. Press the Return key.

    Enable Debug in PHP 7.1

    1. Enable Debug in PHP 7.0
    2. Enable Debug in PHP 5.6
      Enable Debug in PHP 5.6
    3. Enable Debug in PHP 5.5
    4. Enable Debug in PHP 5.4
    5. Enable Debug in PHP 5.3
      Enable Debug in PHP 5.3
    6. Enable Debug in PHP 5.2

    Enable Debug in PHP 7.2

    1. Enable Debug in PHP 5.6
    2. Enable Debug in PHP 5.5
    3. Enable Debug in PHP 5.4
    4. Enable Debug in PHP 5.3
      Enable Debug in PHP 5.3
    5. Enable Debug in PHP 5.2

    Enable Debug in PHP 7.3

    1. Enable Debug in PHP 7.2
      Enable Debug in PHP 7.2
    2. Enable Debug in PHP 7.1
    3. Enable Debug in PHP 7.0
    4. Enable Debug in PHP 5.6
      Enable Debug in PHP 5.6
    5. Enable Debug in PHP 5.5
    6. Enable Debug in PHP 5.4
    7. Enable Debug in PHP 5.3
      Enable Debug in PHP 5.3

    Enable Debug in PHP 7.4

    1. Go to PHP’s bin directory.
    2. Navigate through the folder structure to the index.php file.
      Navigate through the folder structure to the index.php file.
    3. Press the Ctrl + Shift + u hotkey to open Command prompt as administrator.
    4. Input iisreset /stop-apppools /noforceapppools /appcmd set config “aspnet_isapi_debug_level”=5 in the Command prompt.
    5. Press the Enter key.
    6. Restart the Windows system.

    Enable Debug in PHP 7.5

    1. Enable Debug in PHP 7.1
      Enable Debug in PHP 7.1
    2. Enable Debug in PHP 7
    3. Enable Debug in PHP 5.6
      Enable Debug in PHP 5.6
    4. Enable Debug in PHP 5.5
    5. Enable Debug in PHP 5.4
    6. Enable Debug in PHP 5.3
      Enable Debug in PHP 5.3
    7. Enable Debug in PHP 5.2
    8. Enable Debug in PHP 5.1

    Enable Debug in PHP 7.6

    1. Enable Debug in PHP 7.3
      Enable Debug in PHP 7.3
    2. Enable Debug in PHP 7.2
    3. Enable Debug in PHP 7.1
    4. Enable Debug in PHP 7.0
    5. Enable Debug in PHP 5.6
      Enable Debug in PHP 5.6
    6. Enable Debug in PHP 5.5
    7. Enable Debug in PHP 5.4
    8. Enable Debug in PHP 5.3
      Enable Debug in PHP 5.3
    9. Enable Debug in PHP 5.2

    Enable Debug in PHP 7.7

    1. Open your C: drive.
    2. Go to the installed folder of your PHP.
      Go to the installed folder of your PHP.
    3. Open the php.ini file.
    4. Search for the line or key called extension_dir.
    5. Add a new line or change the setting in extension_dir.
    6. Set the extension to debug and extension=php_debug.dll
      Set the extension to debug and extension=php_debug.dll

    Enable Debug in PHP 7.8

    1. Enable Debug in PHP 7.2
      Enable Debug in PHP 7.2
    2. Enable Debug in PHP 7.1
    3. Enable Debug in PHP 5.6
      Enable Debug in PHP 5.6
    4. Enable Debug in PHP 5.5
    5. Enable Debug in PHP 5.4
    6. Enable Debug in PHP 5.3
      Enable Debug in PHP 5.3

    PC problems? Solve them in minutes.

    Is your computer running slow, crashing, or giving you the dreaded Blue Screen of Death? Well, don't worry - there's a solution! ASR Pro is the ultimate software for repairing Windows errors and optimizing your PC for maximum performance. With ASR Pro, you can fix a wide range of common issues in just a few clicks. The application will detect and resolve errors, protect you from data loss and hardware failure, and optimize your system for optimal performance. So don't suffer with a slow or crashed computer any longer - download ASR Pro today!

  • 1. Download and install ASR Pro
  • 2. Run a scan to find and fix errors
  • 3. Reboot your computer for the changes to take effect

  • Enable Debug in PHP 7.9

    1. Enable Debug in PHP 7.2
      Enable Debug in PHP 7.2
    2. Enable Debug in PHP 7.0
    3. Enable Debug in PHP 5.6
      Enable Debug in PHP 5.6
    4. Enable Debug in PHP 5.5
    5. Enable Debug in PHP 5.4
    6. Enable Debug in PHP 5.3
      Enable Debug in PHP 5.3
    7. Enable Debug in PHP 5.2
    8. Enable Debug in PHP 5.1
    9. Enable Debug in PHP 5.0
      Enable Debug in PHP 5.0
    10. Enable Debug in PHP 4.3
    11. Enable Debug in PHP 4.2

    Enable Debug in PHP 7.10

    1. Enable Debug in PHP 7.2
      Enable Debug in PHP 7.2
    2. Enable Debug in PHP 7.1
    3. Enable Debug in PHP 5.6
      Enable Debug in PHP 5.6
    4. Enable Debug in PHP 5.5
    5. Enable Debug in PHP 5.4
    6. Enable Debug in PHP 5.3
      Enable Debug in PHP 5.3
    7. Enable Debug in PHP 5.2
    8. Enable Debug in PHP 5.1
    9. Enable Debug in PHP 5.0
      Enable Debug in PHP 5.0
    10. Disable Debug in PHP 5.0

    Enable Debug in PHP 7.11

    1. Enable Debug in PHP 7.0
    2. Enable Debug in PHP 7.1
    3. Enable Debug in PHP 7.0.1
    4. Enable Debug in PHP 7.0
    5. Enable Debug in PHP 5.6
      Enable Debug in PHP 5.6

    Enable Debug in PHP 7.12

    1. Go to Windows Search and type php 7.
    2. Click on PHP 7.
      Click on PHP 7.
    3. Select index.php.
    4. Press F12 to open developer console.
    5. Find Enable Debugging option, and set it to On.

    Enable Debug in PHP 7.13

    1. Enable Debug in PHP 5.6
    2. Enable Debug in PHP 5.5
    3. Enable Debug in PHP 5.4
    4. Enable Debug in PHP 5.3
      Enable Debug in PHP 5.3
    5. Enable Debug in PHP 5.2
    6. Enable Debug in PHP 5.1
    7. Enable Debug in PHP 5.0
      Enable Debug in PHP 5.0

    Enable Debug in PHP 7.14

    1. To enable Debug Mode, open the PHP file to which you want to debug.
    2. Type the PHP code within Type the PHP code within <?php
    3. Now type the ;
    4. Press the Enter key.

    Enable Debug in PHP 7.15

    1. Enable Debug in PHP 7.31
    2. Enable Debug in PHP 7.2
    3. Enable Debug in PHP 7.0
    4. Enable Debug in PHP 5.6
      Enable Debug in PHP 5.6
    5. Enable Debug in PHP 5.5

    Enable Debug in PHP 7.16

    1. Enable Debug in PHP 5.6
    2. Enable Debug in PHP 5.5
    3. Enable Debug in PHP 5.4
    4. Enable Debug in PHP 5.3
      Enable Debug in PHP 5.3
    5. Enable Debug in PHP 5.2

    Enable Debug in PHP 7.17

    1. Type php -d (space) in Command prompt.
    2. This will show all the PHP 7.1 debug settings.
      This will show all the PHP 7.1 debug settings.
    3. Now, simply enable all the debug options.
    4. Restart your command prompt and PHP.

    Enable Debug in PHP 7.18

    1. Open PHP’s PHP.ini file in a text editor.
    2. Enter the debug line in the PHP ini file, as in the screenshot below.
      Enter the debug line in the PHP ini file, as in the screenshot below.
    Get better performance from your computer with this software - download it to fix your PC today.

    Enable

    1. Open the php.ini file
    2. Locate the [display_errors] section
      Locate the [display_errors] section
    3. Check if display_errors is enabled
    4. If it is, change it to on
    5. Restart the PHP server
    Scroll to Top