无法在OS X 10.10上为MAMP的PHP 5.6.2安装memcached.so扩展名吗?

时间:2014-11-19 08:44:35

标签: php memcached mamp php-extension

我已经安装了memcached,libmemcached和brew,下载了memcached PECL扩展,编译它,按照本教程 - > https://donatstudios.com/OS-X-Mavericks-Memcached-PHP-Extension-Installation

然后我将memcached.so复制到MAMP的扩展名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/

并将行extension = memcached.so添加到/Applications/MAMP/bin/php/php5.6.2/conf/php.ini, 根据MAMP phpinfo,这是我的PHP conf文件 但是我在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

我的配置有什么问题?

如何解决并安装此memcached扩展一次???

2 个答案:

答案 0 :(得分:1)

答案 1 :(得分:0)

brew install memcached

OR

sudo pecl install memcached