Install XAMPP Memcache Extension OSX 10.10 Yosemite
January 22, 2015
1. Try to install Memcache
$ sudo /Applications/XAMPP/xamppfiles/bin/pecl install memcache
If you got an error:
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script. ERROR: `phpize' failed
Download autoconf via cURL
$ curl http://ftp.gnu.org/gnu/autoconf/autoconf-latest.tar.gz > autoconf.tar.gz
Extract it
$ tar -xvzf autoconf.tar.gz
Go to subfolder, and execute it
check the version folder by view listing ls
command
$ cd autoconf-2.69 $ ./configure $ sudo make && sudo make install $ export PHP_AUTOCONF=/usr/local/bin/autoconf
2. Add Memcache Extension in php.ini file
$ sudo nano /Applications/XAMMP/etc/php.ini
add extension=“memcache.so”
on the extension section, save it using control+x
, choose Yes.
And then restart apache
3. Install Memcached for Mac
check if this already installed or not
$ memcached
If it’s not yet installed, install from homebrew
$ brew install memcached
Start Memcached
memcached -d
Stop Memcached
see the proc id by this command:
ps -ef | grep memcached
and use kill
followed the proc id
kill [number proc id]
DONE.
Thanks to Redjaru