Skip to content

Instantly share code, notes, and snippets.

@ar-android
Forked from Niteshvgupta/readme.md
Created February 9, 2017 13:39
Show Gist options
  • Save ar-android/58c801f557af80ed57ad50b386aaed99 to your computer and use it in GitHub Desktop.
Save ar-android/58c801f557af80ed57ad50b386aaed99 to your computer and use it in GitHub Desktop.
Install PHP7-compatible memcache on Mac OS X

1. Install PHP7 with brew

brew install php70

2. Install Memcache from source on PHP7 branch

git clone -b NON_BLOCKING_IO_php7 https://github.com/websupport-sk/pecl-memcache.git
cd pecl-memcache
phpize
./configure
make && make install

3. Add the Memcache extension to the php.ini for PHP7

vi /usr/local/etc/php/7.0/php.ini

Add extension=memcache.so under the extensions section.

@ramlev
Copy link

ramlev commented Feb 13, 2019

now it's just

brew install libmemcached
brew install pkg-config
pecl install memcached

restart webserver / php

@teol
Copy link

teol commented Feb 13, 2019

@ramlev

now it's just

brew install libmemcached
brew install pkg-config
pecl install memcached

restart webserver / php

memcached and memcache are different extensions

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