Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.15

Bug #12554 enableExtension() zeros php.ini in some instances
Submitted: 2007-11-29 22:22 UTC
From: jlightsey Assigned: jlightsey
Status: Closed Package: PEAR (version 1.6.2)
PHP Version: 5.2.4 OS: Linux
Roadmaps: 1.7.0    
Subscription  


 [2007-11-29 22:22 UTC] jlightsey (John Lightsey)
Description: ------------ This problem shows up when using PECL to install PDO_MYSQL and allowing PECL to install PDO automatically as a dependency. In PEAR/Command/Install.php, the enableExtension() function opens php.ini for writing before checking to see if the extension is already enabled. With PDO_MYSQL pulling in PDO automatically, it tries to enable pdo.so twice, causing php.ini to be blanked. This only happens if extension_dir is set correctly in php.ini. Test script: --------------- pecl uninstall PDO_MYSQL pecl uninstall PDO pecl install PDO_MYSQL Expected result: ---------------- ...build output... Build process completed successfully Installing '/usr/local/lib/php/extensions/no-debug-non-zts- 20060613/pdo_mysql.so' install ok: channel://pecl.php.net/PDO_MYSQL-1.0.2 Extension PDO enabled in php.ini Extension PDO_MYSQL enabled in php.ini Extension PDO_MYSQL enabled in php.ini Actual result: -------------- ...build output... Build process completed successfully Installing '/usr/local/lib/php/extensions/no-debug-non-zts- 20060613/pdo_mysql.so' install ok: channel://pecl.php.net/PDO_MYSQL-1.0.2 Extension PDO enabled in php.ini Extension PDO_MYSQL enabled in php.ini php.ini "/usr/local/lib/php.ini" could not be read You should add "extension=pdo_mysql.so" to php.ini

Comments

 [2007-11-29 23:41 UTC] cellog (Greg Beaver)
I'll fix this in CVS prior to release, thanks for the catch
 [2007-12-03 01:21 UTC] cellog (Greg Beaver)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.