FAQ
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

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.




Previous Comments:
------------------------------------------------------------------------

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

Added #patch
bug:18665;patch:fix_opening_of_empty_php_ini_files.patch;revision:1310596472;.

------------------------------------------------------------------------

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

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
%

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedDec 10, '11 at 11:10a
activeDec 10, '11 at 11:10a
posts1
users1
websitepear.php.net

1 user in discussion

Daniel Oconnor: 1 post

People

Translate

site design / logo © 2021 Grokbase