Can't install memcached.so extension for MAMP's PHP 5.6.2 on OS X 10.10?

2.3k Views Asked by At

I have installed memcached, libmemcached with brew, downloaded the memcached PECL extension, compiled it, by following this tutorial -> https://donatstudios.com/OS-X-Mavericks-Memcached-PHP-Extension-Installation

And then I have copied memcached.so to MAMP's extension dir:

cp /tmp/memcached/memcached-2.2.0/memcached-2.2.0/modules/memcached.so /Applications/MAMP/bin/php/php5.6.2/lib/php/extensions/no-debug-non-zts-20131226/

And added the line extension=memcached.so into /Applications/MAMP/bin/php/php5.6.2/conf/php.ini, which is my PHP conf file according to the MAMP phpinfo.
But I get the following error in MAMP/logs/php_error.log:

[19-Nov-2014 09:40:16 Europe/Berlin] PHP Warning:  PHP Startup: memcached: Unable to initialize module
Module compiled with module API=20121212
PHP    compiled with module API=20131226
These options need to match
 in Unknown on line 0

What's the problem with my configuration?

How can I resolve and install this memcached extension once for all???

2

There are 2 best solutions below

0
On BEST ANSWER
0
On
brew install memcached

OR

sudo pecl install memcached