Edit report at https://pear.php.net/bugs/bug.php?id=18665&edit=1

ID: 18665
Updated by: daniel.oconnor@gmail.com
Reported By: kalessin at kalessin dot fr
Summary: PEAR doesn't work with empty php.ini files
-Status: Open
+Status: Feedback
Type: Bug
Package: PEAR
Operating System: Irrelevant
Package Version: SVN
PHP Version: Irrelevant
Roadmap Versions:
New Comment:

-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


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.

Previous Comments:

[2011-07-13 23:34:32] kalessin14

Added #patch


[2011-07-13 20:23:26] kalessin14

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:


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


Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
postedDec 10, '11 at 11:10a
activeDec 10, '11 at 11:10a

1 user in discussion

Daniel Oconnor: 1 post



site design / logo © 2022 Grokbase