Skip to content

Instantly share code, notes, and snippets.

@apueee
Created November 5, 2014 06:45
Show Gist options
  • Save apueee/7db8ca8afe7b076f7c65 to your computer and use it in GitHub Desktop.
Save apueee/7db8ca8afe7b076f7c65 to your computer and use it in GitHub Desktop.
Install PHP memcache pecl extensions in Linux and MacOS
Very few easy steps -
Install memcached
brew install autoconf
brew install Libmemcached
Download desired package from http://pecl.php.net/package/memcache
Extract the tar - tar xzf memcache-X.Y.tgz
Enter into extracted directory from terminal - cd path/to/memcache-X.Y
Run the following commands -
phpize
./configure
make
sudo make install
Copy/paste the .so file from your default php extensions folder
In php.ini, add extension="memcache.so"
Restart Apache
To find out the php extensions folder and php.ini file path, check phpinfo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment