Edit report at https://bugs.php.net/bug.php?id=55196&edit=1
ID: 55196 Updated by: t...@php.net 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: 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. Previous Comments: ------------------------------------------------------------------------ [2011-07-13 02:21:42] paj...@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