I have tried to install memcached in MAMP - Snow Leopard 10.6.2 usin开发者_如何学编程g this tutorial:
Setup a Memcached-Enabled MAMP Sandbox Environment
I finished with no errors the first to the last step: Bonus Section: Start and Stop Memcache with MAMP
After that I restarted my MAMP widget in the dashboard and checked by phpinfo but the memcached extension is not there.
Do you guys successfully installed memcached in your MAMP or do you know any other way on how to make it work?
Thanks in advance :)
Pecl Memcached library for MAMP which is always up to date.
Here is the github repo: https://github.com/majksner/php-memcached-mamp
Already solved it. Posting my answer to my question for future reference :)
How to install memcache php extension in MAMP:
follow this tutorial: http://www.lullabot.com/articles/setup-memcached-mamp-sandbox-environment
http://marc.info/?l=php-general&m=123849727830637&w=2
download this correct memcache.so http://daleenterprise.com/download/memcache.so
Install Xcode Tools from your Mac OS X DVD or download it from Apple Developer Connection to install the GNU Compiler Collection (gcc).
install first the xcode tools in the mac os x dvd then download and install the second one. filename of installer: xcode321_10m2003_developerdvd.dmg
In the latest MAMP for mac I had to add the following to PHP.ini (note also, it is NOT the PHP.ini in the /conf directory, it is in /Applications/MAMP/bin/php/php7.2.7/conf.php.ini, look at the output of phpinfo() to see which PHP.ini is active)
extension=igbinary.so
extension=memcached.so
MAMP 4 does come with memcached. In fact you will need to enable two extensions in php.ini
. This is important, otherwise memcached won't load:
extension=msgpack.so
extension=memcached.so
memcached.so depends on mghpack.so
Just a quick note for anyone in need: MAMP 4 now ships with memcached extension, but it's not enabled by default. One needs to edit php.ini template for PHP versions being used and uncomment memcached.so
精彩评论