Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.12

Bug #18666 PEAR doesn't honor the ext_dir configuration variable
Submitted: 2011-07-14 00:28 UTC
From: kalessin14 Assigned: doconnor
Status: Verified Package: PEAR (version SVN)
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: 1.10.0    

Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem : 21 + 5 = ?

 [2011-07-14 00:28 UTC] kalessin14 (Louis Opter)
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 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/' install ok: channel:// configuration option "php_ini" is not set to php.ini location You should add "extension=/tmp/tmp.km7ZJACEQ3/lib/php5/20090626/" to php.ini % Actual result: -------------- [...] Build process completed successfully Installing '/usr/lib/php5/20090626/' install ok: channel:// configuration option "php_ini" is not set to php.ini location You should add "" to php.ini %


 [2011-07-14 03:36 UTC] kalessin14 (Louis Opter)
 [2011-09-05 23:49 UTC] ifeghali (Igor Feghali)
confirmed on 1.9.4. looks like PEAR doesn't use ext_dir for anything.
 [2011-09-18 13:33 UTC] doconnor (Daniel O'Connor)
-Assigned To: +Assigned To: dufuz
Thanks for the patch Louis, it looks good at a cursory glance.
 [2011-12-10 16:56 UTC] doconnor (Daniel O'Connor)
-Status: Assigned +Status: Closed -Assigned To: dufuz +Assigned To: doconnor
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on by the end of next Sunday (CET). If this was a problem with the website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.
 [2011-12-10 20:48 UTC] kalessin14 (Louis Opter)
Thank you for taking care of it! Do you mind pointing out the changeset(s) that fixes it? Best regards
 [2011-12-11 07:14 UTC] doconnor (Daniel O'Connor)
 [2014-05-29 12:27 UTC] cweiske (Christian Weiske)
-Roadmap Versions: +Roadmap Versions: 1.10.0
 [2014-06-07 03:08 UTC] cweiske (Christian Weiske)
-Status: Closed +Status: Verified
 [2015-09-24 05:08 UTC] vityan666 (Victor Kislov)
 [2015-09-24 05:14 UTC] vityan666 (Victor Kislov)
 [2015-09-24 09:24 UTC] cweiske (Christian Weiske)
Every single PEAR installation I have does have this ext_dir configuration set, although I did not do it manually. And it points to the wrong dir (of an older PHP version I probably used during PEAR installation). Applying this patch will break extension installation for everyone out there I fear.