Offline usage of PHP PEAR packages

Reading through the documentation on PEAR, I was stumped as to how to add a channel offline. Running:

pear channel-discover pear.symfony-project.com

Would try to download http://pear.symfony-project.com/channel.xml which happened to be down for the weekend. Desperately I could not figure out how to make channel-discover read from a file. But then I finally figured out this:

pear channel-add channel.xml

Will do the trick. After running wget http://pearn.symfony-project.com/channel.xml to download the xml file you can then add it offline with the above command. To install the package offline:

pear install symfony-1.02.tgz

After you have downloaded the PEAR package as a tgz file.

Leave a Reply

You must be logged in to post a comment.