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:

  1. Download the MAMP components (source code) http://sourceforge.net/projects/mamp/files/mamp/2.1.2/MAMP_components_2.1.2.zip/download
  2. 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
  3. In the “include” folder create a “php” folder
  4. 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
  5. cd into this folder (in the Terminal) and run “./configure” command:
    cd /Applications/MAMP/bin/php/php5.4.4/include/php
  6. Then run ” pecl upgrade apc” command  in the Terminal to upgrade APC.
  7. 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!

You may also like

More in Code Blog
History of Laravel PHP framework, Eloquence emerging

State of the world of PHP frameworks before Laravel 4 In August of 2009 PHP 5.3 was released. It featured...