Skip to content

Instantly share code, notes, and snippets.

@jeroendesloovere
Forked from weotch/info.md
Created September 5, 2016 09:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeroendesloovere/b39bf45ba57401352b07ae35484d83e4 to your computer and use it in GitHub Desktop.
Save jeroendesloovere/b39bf45ba57401352b07ae35484d83e4 to your computer and use it in GitHub Desktop.
Adding Memcache and Redis to MAMP 2.1.3 (PHP 5.3.20)

Adding Memcache and Redis to MAMP 2.1.3 (PHP 5.3.20)

Not sure how long this will be good for, but here's an easy path to adding Memached and Redis support to MAMP 2.1.3. It depends on the fact that, right now, the Homebrew PHP project and MAMP are using the same versions of PHP. This assumes you have Homebrew and MAMP 2.1.3 installed. I'll just be describing the process for PHP 5.3.20.

  1. Make sure you've tapped homebrew-dupes and homebrew-php with: brew tap homebrew/dupes and brew tap josegonzalez/php.

  2. Install memcached and redis for PHP Homebrew: brew install php53-memcache and brew install php53-redis.

  3. Go into MAMP and navigate to: File menu > Edit Template > PHP > PHP 5.3.2.0 php.ini.

  4. Find the "; Extensions" block at line 531. Add the following at the end of the list of current extensions:

     extension="/usr/local/Cellar/php53-memcache/2.2.7/memcache.so"
     extension="/usr/local/Cellar/php53-redis/2.2.2/redis.so"
    
  5. Restart MAMP.

  6. Your PHPInfo should now mention Memcache and Redis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment