Where do PEAR packages normally get installed?

rlandster picture rlandster · Mar 17, 2011 · Viewed 42.4k times · Source

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?

Answer

cweiske picture cweiske · Apr 6, 2011
/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.