Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where do PEAR packages normally get installed?

Tags:

php

pear

I am using a Debian squeeze server. I 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?

like image 893
rlandster Avatar asked Mar 17 '11 02:03

rlandster


People also ask

How do I know if PEAR Mail is installed?

Open the file in your browser, to verify the include_path your web server is using. pear list -a to see all packages installed, not only from the default channel.

How do I install PEAR packages?

Under Programming click the PHP PEAR Packages icon. Use the search box or click the button to show all available PEAR extensions. Click the Install Now button next to the extension you wish to install to your account. Follow the php.

How do I know if PEAR is installed on Windows?

Open the file in your browser as http://localhost/check_php.php , to verify the include_path your web server is using. In every case, PEAR's php_dir should be in the include path. If not, add it in your system's php.

What is PEAR package?

PEAR packages A PEAR package is distributed as a gzipped tar file. Each archive consists of source code written in PHP, usually in an object-oriented style. Many PEAR packages can readily be used by developers as ordinary third party code via simple include statements in PHP.


1 Answers

/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.

like image 52
cweiske Avatar answered Oct 04 '22 19:10

cweiske