Skip to content

Instantly share code, notes, and snippets.

@weotch
Last active September 5, 2016 09:01
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save weotch/5293881 to your computer and use it in GitHub Desktop.
Save weotch/5293881 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.

@weotch
Copy link
Author

weotch commented Nov 11, 2013

Here's what I did for MAMP 2.1.4 and PHP 5.4.10: http://stackoverflow.com/a/15531409/59160

@jeroendesloovere
Copy link

Thanks, this has solved it for me!!!

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