Upgrading APC to install Symfony framework on MAMP
For upcoming post (speed comparison and tips for Laravel optimization) I will include Symfony framework as one of the contenders. As I have MAMP server with PHP 5.4.4 and APC 3.1.9, getting Symfony to run wasn’t as straight forward because Symfony requires you to have APC 3.1.13 .
After spending hours of trying to find out what works to upgrade APC on MAMP and unfruitful attempts, I came up with my own method. To upgrade APC on your MAMP installation you can follow these steps:
- Download the MAMP components (source code) http://sourceforge.net/projects/mamp/files/mamp/2.1.2/MAMP_components_2.1.2.zip/download
- Create a folder called “include” in your MAMP PHP binaries folder so that you have “include” folder here: Applications/MAMP/bin/php/php5.4.4/include
- In the “include” folder create a “php” folder
- Extract the MAMP components archive and extract the PHP 5.4.4 folder into your Applications/MAMP/bin/php/php5.4.4/include/php folder
- cd into this folder (in the Terminal) and run “./configure” command:
cd /Applications/MAMP/bin/php/php5.4.4/include/php ./configure
- Then run ” pecl upgrade apc” command in the Terminal to upgrade APC.
- If you see a message “Build process completed successfully”, APC should be upgraded now. Restart MAMP and you should have Symfony working now.
This is what worked for me and I hope it works for you too!