Bug #55196 [Bgs]: PEAR doesn't honor the ext_dir configuration variable
| From: | kalessin at kalessin dot fr | Date: | Wed, 13 Jul 2011 21:30:59 +0000 |
| Subject: | Bug #55196 [Bgs]: PEAR doesn't honor the ext_dir configuration variable | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-161871@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55196&edit=1
ID: 55196
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
Status: Bogus
Type: Bug
Package: Unknown/Other Function
Operating System: Irrelevant
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
This bug has been submitted again in the right bug tracker:
http://pear.php.net/bugs/bug.php?id=18666
Previous Comments:
------------------------------------------------------------------------
[2011-07-13 14:47:23] kalessin at kalessin dot fr
Setting extension_dir will not erase the "system" extension directory? I'm saying
that because extension_dir is not a search path.
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.
------------------------------------------------------------------------
[2011-07-13 04:38:16] till@php.net
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-13 02:21:42] pajoye@php.net
Please report this bug here:
http://pear.php.net/pear
------------------------------------------------------------------------
[2011-07-12 22:55:05] kalessin at kalessin dot fr
Description:
------------
I'm using PEAR 1.9.0, but newer version are also affected.
PEAR doesn't honor the ext_dir configuration variable, or I didn't understand how to use
it.
The ext_dir configuration variable is supposed to be used when you want to install extensions in a
custom directory. This is useful to allow unprivileged user to install php extensions in their home
directories.
To make the ext_dir configuration variable working I fixed the build function in Builder.php to use
ext_dir as a prefix for the destination path of the extension. I also fixed the enableExtension
function in Command/Install.php to write the full path to the extension in php.ini when ext_dir is
set.
While these fixes fit my use case they are not perfect because they use ext_dir as a prefix instead
as the full dirname for the extension. Moreover I didn't take care of possible regressions and
some other places in the code certainly need to be adjusted (e.g: error messages).
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
ext_dir=
mktemp -d
pear config-set ext_dir $ext_dir user
pecl install mongo
rm -rf $ext_dir
Expected result:
----------------
[...]
Build process completed successfully
Installing '/tmp/tmp.km7ZJACEQ3/lib/php5/20090626/mongo.so'
install ok: channel://pecl.php.net/mongo-1.2.1
configuration option "php_ini" is not set to php.ini location
You should add "extension=/tmp/tmp.km7ZJACEQ3/lib/php5/20090626/mongo.so" to php.ini
%
Actual result:
--------------
[...]
Build process completed successfully
Installing '/usr/lib/php5/20090626/mongo.so'
install ok: channel://pecl.php.net/mongo-1.2.1
configuration option "php_ini" is not set to php.ini location
You should add "extension=mongo.so" to php.ini
%
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55196&edit=1