Edit report at https://bugs.php.net/bug.php?id=55194&edit=1
ID: 55194
User updated by: kalessin at kalessin dot fr
Reported by: kalessin at kalessin dot fr
-Summary: PEAR doesn't honor the ext_dir configuration
variable
+Summary: PEAR doesn't work with empty php.ini files
Status: Bogus
Type: Bug
Package: Unknown/Other Function
Operating System: Irrelevant
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
!$foo and $foo === false are not the same thing when $foo is an empty string.
I'm waiting for a confirmation e-mail to submit the bug to PEAR. It's not
really clear if any kind of registration is required or if it works like here.
Previous Comments:
------------------------------------------------------------------------
[2011-07-13 07:48:55] [email protected]
Sorry, somehow I f'd up the comment, what I meant to say was:
Please report bugs for pear on http://pear.php.net/pear
Also, your patch does literally nothing. !$foo and $foo === false are the same
thing.
file() returns false when the path is incorrect.
Anyhow, please report over at PEAR.
------------------------------------------------------------------------
[2011-07-13 07:48:11] [email protected]
It's bogus anyway.
It's not supposed to suggest that.
You'll have to set extension_dir in your php.ini so an extension is found and
can
be loaded. The complete path is never added to extension=foo.so.
------------------------------------------------------------------------
[2011-07-12 22:21:23] kalessin at kalessin dot fr
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
PS: It's not clear where this bug should be reported, the PEAR website doesn't
seem to have the concept of bugs in PEAR itself but only in packagesâ¦
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
%
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55194&edit=1