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?
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.
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.
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.
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.
/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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With