现在MAMP拥有一个memcached服务器并且我看到它有一个memcached扩展。缺少memcache扩展 - 如何安装? MAMP 4.2
我们使用memcache扩展,虽然我可以很容易地配置这与PHP 5.x,因为有很多的指南,我似乎无法得到这与MAMP Pro 4.2上的PHP 7.0.20工作。
有谁知道如何让MAMP Pro 4.2使用memcache扩展,而不是memcached扩展?
现在MAMP拥有一个memcached服务器并且我看到它有一个memcached扩展。缺少memcache扩展 - 如何安装? MAMP 4.2
我们使用memcache扩展,虽然我可以很容易地配置这与PHP 5.x,因为有很多的指南,我似乎无法得到这与MAMP Pro 4.2上的PHP 7.0.20工作。
有谁知道如何让MAMP Pro 4.2使用memcache扩展,而不是memcached扩展?
我对MAMP 3.5.2上的memcache和memcached模块使用PHP 7.0.8有同样的问题,并且能够从源代码安装这两个模块。对于memcache,我使用了websupport-sk git repo。使用它需要您自担风险。下面是步骤,我遵循内存缓存安装
sudo su
cd /private/tmp
wget https://github.com/websupport-sk/pecl-memcache/archive/NON_BLOCKING_IO_php7.zip
unzip NON_BLOCKING_IO_php7.zip
cp -r pecl-memcache-NON_BLOCKING_IO_php7 /Application/MAMP/bin/php/php7.0.8/include/php/ext/memcache
cd /Application/MAMP/bin/php/php7.0.8/include/php/ext/memcache
phpize
./configure --enable-memcache --with-php-config=/Application/MAMP/bin/php/php7.0.8/bin/php-config
make
cp modules/memcache.so /Applications/MAMP/bin/php/php7.0.8/lib/php/extensions/no-debug-non-zts-20151012/memcache.so
添加以下行为php.ini
[memcache]
memcache_extension="/Applications/MAMP/bin/php/php7.0.8/lib/php/extensions/no-debug-non-zts-20151012/memcache.so"
extension=memcache.so
希望这有助于!
不得不更新路径,但工作像魅力欢呼! –
您是否尝试从源安装memcache扩展? –
是的,我确实尝试过 –