: This article describes how to add memcache extensions to MACMAMP. For more information about PHP tutorials, see. Mamp on PHP is 5.5.26 and so on, compile memcache module need to use php source code, mamp does not come with, to the php official website next php-5.5.26.tar.gz,
Decompress the package and generate zend_config.h for backup.
tar -zxvf php-5.5.26.tar.gzcd php-5.5.26./configure
If an error is reported, follow the prompts to install the dependency. for example, if zlib is used separately, unzip the package. -- prefix-dir =
Develop path
Download and compile:
curl -O http://pecl.php.net/get/memcache-2.2.4.tgz;tar xf memcache-2.2.4.tgz;cd memcache-2.2.4;mkdir /Applications/MAMP/bin/php/php5.5.10/include/
#/Volumes/SOFT/php-5.5.11 is the php Directory
ln -s /Volumes/SOFT/php-5.5.11 /Applications/MAMP/bin/php/php5.5.10/include/php
/Applications/MAMP/bin/php/php5.5.10/bin/phpize;./configure --with-php-c/MAMP/bin/php/php5.5.10/bin/php-configmakesudomakeinstall
If the prompt is as follows, it indicates that the system does not have autoconf. you need to install it and then run phpize again:
Cannot find autoconf. Please check your autoconf installation and the$PHP_AUTOCONF environment variable. Then, rerun this script.
Install autoconf and:
curl -O http://ftp.gnu.org/gnu/autoconf/autoconf-2.68.tar.bz2;tar -xvf autoconf-2.68.tar.bz2cd autoconf-2.68./configure && makesudomakeinstall
Now the installation is complete. click the mamp menu, file-> edit template-> php 5.5.10 php. ini, and add:
[memcache] extension=memcache.so
The above describes how to add memcache extensions for mac mamp, including the Application content, and hope to help friends who are interested in PHP tutorials.