---
title: "Displaying errors on-screen for debugging"
date: "2014-11-11"
category: "php"
slug: "displaying-errors-on-screen-for-debugging"
---

During development or when troubleshooting a PHP application, displaying errors directly in the browser helps identify typos, undefined variables, misconfiguration, and other logic issues.

## Solution

Enable `display_errors` and increase the `error_reporting` verbosity by [[changing-php-settings]]. For example, in a [[htaccess-guide]] file:

php\_flag display\_errors On
php\_value error\_reporting 9999999

## Caveats

Some applications have their own debug configuration that toggles these settings internally via [ini\_set](http://php.net/ini_set). Check your application's documentation for specific instructions.

### Common Applications

- WordPress: [Debugging in WordPress](http://codex.wordpress.org/Debugging_in_WordPress)
- Drupal: [Debugging Drupal](http://ratatosk.net/drupal/tutorials/debugging-drupal.html)
- Symfony: [The Debug Component](http://symfony.com/doc/current/components/debug/introduction.html)
- Zend Framework: [Part 2 - Debugging Your Application](http://devzone.zend.com/1735/zend-framework-tutorial-series-part-2_debugging-your-application/)
