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

Bug #18665 PEAR doesn't work with empty php.ini files
Submitted: 2011-07-14 00:23 UTC
From: kalessin14 Assigned: cweiske
Status: Closed Package: PEAR (version SVN)
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: 1.9.5    
Subscription  


 [2011-07-14 00:23 UTC] kalessin14 (Louis Opter)
Description: ------------ I'm using PEAR 1.9.0, but newer version are also affected. PEAR fails to open and parse an empty php.ini file because the return value of file() is not checked correctly (see attached patch). It's easy to end up with an empty php.ini file when you set the php_ini configuration variable to a custom location. The attached patch applies to SVN r313186 Best regards Test script: --------------- #!/bin/sh php_ini=`mktemp` pear config-set php_ini $php_ini user pecl install mongo rm -f $php_ini Expected result: ---------------- [..] install ok: channel://pecl.php.net/mongo-1.2.1 Extension mongo enabled in php.ini % Actual result: -------------- [...] install ok: channel://pecl.php.net/mongo-1.2.1 php.ini "/tmp/tmp.V6wU8jpMA4" could not be read You should add "extension=mongo.so" to php.ini %

Comments

 [2011-07-14 03:34 UTC] kalessin14 (Louis Opter)
 [2011-12-10 17:10 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Feedback
Thank you for taking the time to report a problem with the package. This problem may have been already fixed by a previous change that is in the SVN of the package. Please checking out the SVN repository of this package and upgrade svn checkout svn.php.net/repository/pear/pear-core/trunk pear upgrade package2.xml or pear upgrade package.xml If you are able to reproduce the bug with the latest SVN, please change the status back to "Open". Again, thank you for your continued support of PEAR.
 [2014-06-07 03:21 UTC] cweiske (Christian Weiske)
-Status: Feedback +Status: Verified -Roadmap Versions: +Roadmap Versions: 1.9.5
 [2014-06-08 03:56 UTC] cweiske (Christian Weiske)
-Status: Verified +Status: Closed -Assigned To: +Assigned To: cweiske
Thanks for the patch. Applied in git stable branch for version 1.9.5.