Installing PEAR on Mac OS X Leopard XAMPP

Installing PEAR on Mac OS X Leopard XAMPP

1249498426_serverXAMPP 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.

About The Author

Brett Popoleo
I am a web designer, Drummer and web application developer from Pittsburgh PA. I love to create unique and functional websites for business, personal use, or anything in between. If you need a corporate design for your business, a shopping cart for your store, or even a unique design for your blog, give me a call or contact me here and we can start to work together.

8 Comments

  • Brian on July 22, 2008

    Great, Thanks!!

  • cat on November 29, 2008

    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

  • Richard C on February 2, 2009

    Thanks very much – I’ve been scratching my head over this for absolutely ages! I wish the XAMPP/Pear forums were this helpful! Thanks!

  • Chris on March 23, 2009

    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.

  • muunkky on April 22, 2009

    people like you make the world go around.

  • Silvana on April 22, 2009

    Interesting to know.

  • Mauricio Munera on May 21, 2009

    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!!

  • Debt Settlement on September 2, 2009

    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

Leave a Reply