开发者

Where do PEAR packages normally get installed?

开发者 https://www.devze.com 2023-02-17 03:19 出处:网络
I am using a Debian squeeze server. I开发者_JAVA技巧 have installed PEAR using aptitude install php-pear. This created a directory /usr/share/php/PEAR.

I am using a Debian squeeze server. I开发者_JAVA技巧 have installed PEAR using aptitude install php-pear. This created a directory /usr/share/php/PEAR.

I installed some PEAR packages including Phing. I installed the Phing files using pear install --alldeps phing/phing and the files showed up in /usr/share/php/phing.

But shouldn't PEAR packages (under normal circumstances) be put in /usr/share/php/PEAR? When I run

pear config-get php_dir

I get "/usr/share/php". Have I got something configured wrong?


/usr/share/php/

is correct for Debian.

/usr/share/php/PEAR

itself contains classes for PEAR itself.

The reason for using /usr/share/php is that the pear CLI tool is an installer that installs libraries (or applications) for PHP - choosing php is thus correct.


Yes, that is the correct directory on Debian, and Ubuntu.

Regardless of which O/S you are using, you can find the correct install directory by running: pear config-get php_dir via a console. And you get full directory path.

For example, with XAMPP application on Microsoft Window you have to go to XAMPP installation directory path <<XAMPP Installation folder path>>/bin and use ./pear config-get php_dir which lead to execute the binary file using current location and do the same job.


in case php is installed in /usr/local/php

pear is here:

/usr/local/php/lib/php


I am using Mac OSX Lion. I installed pear in /usr/lib/php/pear

So the data also be installed there.


On my installation of Debian PEAR is located here:

/usr/local/lib/php


Just throwing this out there, in case you have pear installed in a round-about way:

cd /
find . -type d -name pear

For example, I was using MAMP on one of my local machines and it was in a really weird place.


On my 64-bit Ubuntu system, the pear packages are installed to /usr/share/php/PEAR/, but I do not know how to change the pear install path. Maybe you can configure this somewhere.


If you're using CPanel to install them they're much likely to be located in

./opt/cpanel/ea-php{VERSION}/root/usr/share/pear
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号