Our Blog

How To Install PEAR in Mac OS X Leopard

Wednesday, January 02, 2008

Unlike previous version of OS X, Leopard doesn’t come with PHP’s PEAR repository installed by default. Luckily, installing is quick and painless. From a command line:

1 curl http://pear.php.net/go-pear > go-pear.php
2 sudo php -q go-pear.php

Just press enter to select all the default choices except for the installation directory. For that, use /usr/local. (Thanks, Steve.)

Next we need to modify our php.ini file to include the new PEAR files:

1 sudo cp /etc/php.ini.default /etc/php.ini

Edit /etc/php.ini and change

1 ;include_path = ".:/php/includes"

to read

1 include_path = ".:/usr/local/share/pear"

Restart Apache and you’re done!

Contact

PO Box 92546
Nashville, TN 37209

+1 800-939-9054

support@clickontyler.com