1. 程式人生 > >Linux-LAMP安裝擴展模塊memcache

Linux-LAMP安裝擴展模塊memcache

安裝擴展模塊memcache

Linux-LAMP安裝擴展模塊memcache

cd /usr/local/src/
wget http://www.apelearn.com/bbs/data/attachment/forum/memcache-2.2.3.tgz
tar -zxvf memcache-2.2.3.tgz
/usr/local/php/bin/phpize  //Cannot find autoconf. Please check your autoconf installation and the
yum install autoconf -y
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make  //輸出報錯信息

技術分享圖片

vim memcache.c
將所有的:zend_list_insert(pool, le_memcache_pool); 
改為:zend_list_insert(pool, le_memcache_pool TSRMLS_CC);

將所有的:zend_list_insert(mmc, le_pmemcache);
改為:zend_list_insert(mmc, le_pmemcache TSRMLS_CC);
講所有的:if (!zend_is_callable(failure_callback, 0, NULL))
改為:if (!zend_is_callable(failure_callback, 0, NULL, NULL))
make && make install
vim /usr/local/php/etc/php.ini
extension=memcache.so
/usr/local/php/bin/php -m | grep memcache
memcache

Linux-LAMP安裝擴展模塊memcache