Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 263061 - dev-php5/xdebug: default_enable should be off for system consistency
Summary: dev-php5/xdebug: default_enable should be off for system consistency
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on: 256080
Blocks:
  Show dependency tree
 
Reported: 2009-03-19 17:55 UTC by Daniel Neugebauer
Modified: 2010-01-01 20:27 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Neugebauer 2009-03-19 17:55:03 UTC
(proposal)

Although the default setting specified in Xdebug's documentation (http://www.xdebug.org/docs/basic) says default_enable is on by default, we should turn it off on Gentoo because Xdebug can be installed accidently as a dependency (e.g. by PHPUnit) and then threatens normal operation of a previously running web server.

At least there should be a warning on postinstall because as long as there is no warning, admins may spend hours searching for the cause.

I think it would be best to make this a USE flag, deactivate it by default and/or notify the user.

Reproducible: Always

Steps to Reproduce:
1. emerge xdebug or phpunit (xdebug is a dependency)
2. restart Apache
3. run any erroneous script (like: <?php test(); ?>)
Actual Results:  
Got an orange table showing call stack and variable dumps. (expected behaviour after intended installation of Xdebug according to the official documentation, however this will break many websites accidentally without former warning)

Expected Results:  
The standard PHP inline error message like: "Fatal error: Call to undefined function test() ..." (this deviates from the intended behaviour of an intended installation of Xdebug)

Because it breaks a previously working system by accident, I propose to set xdebug.default_enable="0" in /etc/php/apache2-php5/ext/xdebug.ini (change line 44 of both ebuilds to php-ext-base-r1_addtoinifiles "xdebug.default_enable" '"0"'), display a warning on postinstall or make the default setting configurable by a USE flag.
Comment 1 Matti Bickel (RETIRED) gentoo-dev 2009-08-23 10:36:03 UTC
will be fixed in the 2.0.5 ebuild
Comment 2 Ben de Groot (RETIRED) gentoo-dev 2010-01-01 20:27:36 UTC
Disabled by default in 2.0.5. Thanks for reporting!