OS X: How to Install Symfony into MAMP

   Posted May 21, 2008 by David Kirk in Apple Mac

Installing the open source php framework Symfony into an OS X box can be a challenge. By using MAMP and these directions, you will be up and running in no time.


MightyQ is becoming a jedi Symfony master. Just as I was getting skilled in plain ole php, he is now dragging me (correctly) into the world of Symfony. Here are the steps I used to get Symfony up and running in MAMP.

Now, I already had MAMP installed from my previous project of installing wp using MAMP in OS X.

If you do not have it, go ahead and download MAMP. Mount the MAMP dmg and drag the folder directly into your applications directory. Do not use a subdirectory.

Open the php.ini text file in a text editor. It should live here:

/Applications/MAMP/conf/php5/php.ini

Change the memory limit to 32M by editing the memory_limit part of the file to the following:

memory_limit = 32M ;

Save the file and close your text editor. Now fire up your terminal…

Now we are going to move leopard’s php to a safe place…

sudo mv /usr/bin/php /usr/bin/php-old

Link the MAMP php into where leopard’s php used to be…

sudo ln -s /Applications/MAMP/bin/php5/bin/php /usr/bin/php

If you have PEAR already installed, we are going to move it as well. If you don’t have PEAR, this will obviously error out which you can ignore.

sudo mv /usr/bin/pear /usr/bin/pear-old

Link MAMP’s PEAR into bin…

sudo ln -s /Applications/MAMP/bin/php5/bin/pear /usr/bin/pear

The following two commands will use PEAR to download and install symfony.

pear channel-discover pear.symfony-project.com
pear install symfony/symfony

Now place link symfony into bin…

sudo ln -s /Applications/MAMP/bin/php5/bin/symfony /usr/bin/symfony

If everything has worked correctly, you should now be able to fire up symfony from the command line.

I originally got the majority of these directions from the following thread.

 

About David Kirk

David Kirk is one of the original founders of tech-recipes and is currently serving as editor-in-chief. Not only has he been crafting tutorials for over ten years, but in his other life he also enjoys taking care of critically ill patients as an ICU physician.
View more articles by David Kirk

The Conversation

Follow the reactions below and share your own thoughts.