Created
January 9, 2015 01:06
-
-
Save montrealist/fd8d19f3b19b0bc00206 to your computer and use it in GitHub Desktop.
How to install memchache module on Mac OS X 10.9 running MAMP (or Apache)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Install brew (http://brew.sh/) | |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
# 2. Drop php_info() into the home directory of your MAMP-run site and find out your PHP version. Mine was 5.6.2. | |
# 3. Install appropriate version of memcache using Brew (also install memcache just in case): | |
brew install memcache | |
brew install php56-memcache | |
# 4. Brew will tell you something like this: | |
# To finish installing memcache for PHP 5.6: | |
# * /usr/local/etc/php/5.6/conf.d/ext-memcache.ini was created, | |
# 5. Look at the ext-memcache.ini (with less or whatever) and find out location of memcache.so | |
# 6. Copy memcache.so to your MAMP's extensions directory: | |
cp memcache.so /Applications/MAMP/bin/php/php5.3.6/lib/php/extensions/no-debug-non-zts-20090626/ | |
# 7. Add reference to the module to your php.ini (make sure the PHP version in the folder name is the same as the one from #2 above). | |
emacs /Applications/MAMP/bin/php/php5.3.6/conf/php.ini # add line: extension=memcache.so | |
# If using Apache2: | |
sudo emacs /etc/php.ini # add line: extension=memcache.so | |
# 8. Restart your MAMP server (or your Apache). Refresh page from #2 above, make sure you can now find 'memcache' somewhere on that page. | |
# Note: got direction from here: https://gist.github.com/ryanjbonnell/3880048 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment