xdebug does not display errors by default

Bug #1096464 reported by Nick Bair on 2013-01-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xdebug (Ubuntu)
Undecided
Unassigned

Bug Description

Expected behavior:
Xdebug, when installed, should display detailed error information in the browser window.

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.

Nick Bair (njbair) on 2013-01-05
description: updated
Wellu Mäkinen (wellu) wrote :

I can confirm this bug and the fix is trivial to make. I could do a patch if someone points me in to right repository for xdebug.

Martin Meredith (mez) wrote :

Will not fix. Installing the package does not neccesarily mean you want debug info to show. You may just want a local trace to be saved or similar.

We will not change the users settings in the package install.

Nick Bair (njbair) wrote :

Forgot about filing this bug. I agree with Martin that the default behavior is, in fact, sensible. There are use cases for xdebug in a live environment that I did not consider when filing the bug. Thanks.

Martin Meredith (mez) on 2013-08-15
Changed in xdebug (Ubuntu):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers