Changing Pecl installation directory

て烟熏妆下的殇ゞ 提交于 2019-12-01 08:36:54

问题


Hi i'm having trouble with pecl installation, the problem i'm having is i'm installing gearman , and i'm now at the stage of installation of the pecl PHP extension.

it should be a simple as executing the command :

$ sudo pecl install gearman

the installation was successfull and I could even test a php containing

<?php
echo "Gearman version: " . gearman_version() . PHP_EOL;
?>

executing it in CLI php using :

$ php gearman_version.php

does the trick. Unfortunately I am using a stack. lappstack to be precise, and I have a separate php in the installation of my lappstack which is in :

/home/userName/lappstack-5.4.34-0/php

where php/etc contains my php.ini for web use.

now, going back to the pecl installation of gearman, executing the pecl install gearman results to gearman being installed in a separate php5 installation, and the gearman.so is installed in :

/usr/lib/php5/20121212/gearman.so

which, ideally, the gearman.so should be contained in :

/home/userName/lappstack-5.4.34-0/php/lib/php/extensions/gearman.so

like all my other extensions.

which actually results to the application not being able to use the gearman extension. And the php.ini that is being pointed to, to use gearman is actually the ones in :

/etc/php5/cli

and

/etc/php5/apache2

I need help, I'm really in the process of getting haywired in my installations. Thanks !


回答1:


You can see the configured directories with

$ pear config-show

To change the directories, e.g. php_dir, use config-set:

$ pear config-set php_dir /path/to/foo


来源:https://stackoverflow.com/questions/26584599/changing-pecl-installation-directory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!