Installing PEAR on Mac OS X Leopard XAMPP
XAMPP for Mac does come with PEAR but it is NOT configured.
Update PEAR
sudo su – [Enter root password]
cd /Applications/xampp/xamppfiles/lib/php/pear
sudo php pearcmd.php channel-update pear.php.net
sudo php pearcmd.php install PEAR
sudo php pearcmd.php install Log
sudo php pearcmd.php list
add PEAR to the php.ini include_path
Edit /Applications/xampp/etc/php.ini (include path is at the very end of the php.ini file)
include_path = “.:/Applications/xampp/xamppfiles/lib/php:/Applications/xampp/xamppfiles/lib/php/pear”
To install a package
Type
sudo su [Enter root password]
cd /Applications/xampp/xamppfiles/lib/php/pear
pear install pear/PACKAGE_NAME
Thats it, good luck.
Comments (8)
Great, Thanks!!
This is the first post I have EVER made to a forum. Thank you SO much for posting these instructions, you have just ended a VERY frustrating evening for me. THANK YOU THANK YOU THANK YOU
Thanks very much – I’ve been scratching my head over this for absolutely ages! I wish the XAMPP/Pear forums were this helpful! Thanks!
Hey, seems like i can’t install the packages i.e
sh-3.2# pear install pear/HTML
No releases available for package “pear.php.net/HTML”
Cannot initialize ‘channel://pear.php.net/HTML’, invalid or missing package file
Package “channel://pear.php.net/HTML” is not valid
install failed
Any ideas on would to do would be greatly appreciated, as i can’t yet use php and pear function calls together.
people like you make the world go around.
Interesting to know.
Thank you for this post it was very useful, I will just fix this:
To install a package I have to use this command:
sudo su [Enter root password]
cd /Applications/xampp/xamppfiles/lib/php/pear
sudo php pearcmd.php install pear/<>
thanks!!
Apologize for my bad english, I deliberate on its a gracious hell of your writing. Famously I organize faced alot of difficulties in this train but your article will definately help me in future. Say thank you You