PEAR in PHP distribution

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View


I have installed PHP 5.0.3 for OS X. I have read in several places that
PEAR is included in recent installations of PHP.  I'm having trouble
getting PEAR DB working. How would I know or test to see if it was
included in my installation?

Just in case it helps I've attached the phpinfo() configure line below


'./configure' '--prefix=/usr/local/php5'
'--with-config-file-path=/usr/local/php5/lib' '--with-apxs'
'--with-iconv' '--with-openssl=/usr' '--with-zlib=/usr'
'--with-libxml-dir=/usr/local/php5' '--with-xsl=/usr/local/php5'
'--with-gd' '--with-jpeg-dir=/usr/local/php5'
'--with-png-dir=/usr/local/php5' '--with-zlib-dir=/usr'
'--with-freetype-dir=/usr/local/php5' '--with-t1lib=/usr/local/php5'
'--with-imap=../imap-2002d' '--with-imap-ssl=/usr'
'--with-ldap' '--with-mime-magic=/usr/local/php5/etc/magic.mime'
'--with-iodbc=/usr' '--with-xmlrpc' '--with-expat-dir=/usr/local/php5'
'--with-iconv-dir=/usr' '--with-curl=/usr/local/php5' '--enable-exif'
'--enable-wddx' '--enable-soap' '--enable-sqlite-utf8' '--enable-ftp'
'--enable-sockets' '--enable-dbx' '--enable-dbase' '--enable-mbstring'
'--enable-calendar' '--with-bz2=/usr' '--with-mcrypt=/usr/local/php5'
'--with-mhash=/usr/local/php5' '--with-mssql=/usr/local/php5'

Re: PEAR in PHP distribution

Have you checked out the PEAR manual? /

You should have a pear binary as well, try running it from shell.

Re: PEAR in PHP distribution

Oops I didn't mean a pear binary but rather a pear executable named
pear (it's a php file). :) Anyway the manual talks about these things,
check out the installation and configuration chapters.

Re: PEAR in PHP distribution

In the pear manual it says

When using PHP >= 4.3.0, the PEAR Package Manager is already installed
unless one has used the ./configure option --without-pear.

my php configure line does not have --without-pear in it so the package
manager should be installed on my computer

However if I type the command "pear" at the command line my computer
says "command not found". Perhaps I have to type the full path to the
pear manager because that directory is not in my path?

I'm confused.


Re: PEAR in PHP distribution

Yes, it would need to be in your PATH. I assume it would be in
/usr/local/bin but I guess not. Maybe it's in /usr/local/php5 but then
again maybe you want to run: find / -name pear -print  or use the
locate command.

If you can't find it simply install pear, it shouldn't hurt anything :)
Also, did you compile this or is it a package? If a package perhaps the
creator simply removed the pear stuff.

Site Timeline