Wednesday, October 31st, 2007
Installing symfony on OS X Leopard
Just in case anyone runs into trouble with this, I just want to describe the steps for installing the symfony framework on an OS X 10.5 (Leopard) machine.
The good news is that Leopard comes with PHP 5 built in. The bad news is that PEAR is not included, which is needed to install symfony in the most convenient way.
My first attempt to remedy the situation was to run the darwin ports package manager to install pear:
# port install pear-base
Unfortunately there were two problems. First of all, the version of pear that comes with darwin ports does not use the OS X version of PHP by default, but rather looks for the PHP darwin port. This was easily remedied by adding export PHP_PEAR_PHP_BIN=`which php` to /etc/profile but unfortunately that’s not enough. The second problem is that a few files seems to be missing in the darwin port of PEAR and you’ll get the following error when you try to install symfony:
PEAR_Downloader::require_once(Structures/Graph.php): failed to open stream: No such file or directory in Downloader.php on line 1230
Indeed, even running pear install Structures_Graph results in this error message.
The Solution
This blog suggested go-pear.php as an alternative way to install PEAR on the Mac and it does work. So with no further ado, this is how to install symfony on Leopard:
sudo su - curl http://pear.php.net/go-pear > go-pear.php php -q go-pear.phppear channel-discover pear.symfony-project.com pear install symfony/symfony
Good luck with your Leopard powered symfony hacking.
November 11th, 2007 at 1:50 am
Works like a charm. Thanks for posting this up!
November 11th, 2007 at 7:24 pm
thanks a lot. Succeed on first trial. Great instructions.
December 2nd, 2007 at 1:20 pm
Works like a charm! Great post! Thank you!
December 13th, 2007 at 12:57 am
Thanks … worked for me
January 6th, 2008 at 8:32 pm
Now pear.symfony-project.com became pear.symfony-project.com
January 6th, 2008 at 8:32 pm
Now pear.symfony-project.com became pear.symfony-project.org