Comment 0 for bug 1096464

Revision history for this message
Nick Bair (njbair) wrote :

Expected behavior:
Xdebug, when installed, should enable the PHP configuration option "display_errors"

Actual behavior:
No error details are displayed. Instead, the web server returns a 500 Internal Server Error

Details:
The default PHP5 Apache configuration located at /etc/php5/apache2/php.ini has display_errors turned off by default. This makes sense because exposing these errors is a security risk in a production environment. This can easily be changed manually by the administrator. However, Xdebug is a tool for debugging, not for production, and its installation by the administrator implies a development/debugging environment, not production. The xdebug package should enable display_errors when it is installed.

This can be done by adding a single line to the package file installed to /etc/php5/mods-available/xdebug.ini:
display_errors = On

Upon installation, the above config file is installed into PHP's mods-available directory, and it is also symlinked to /etc/php5/conf.d/20-xdebug.ini. Thus, the configuration is loaded after php.ini and the second occurrence of display_errors overrides the first.

This simple change will allow xdebug to work as expected out-of-the-box.