./pecl install memcache downloading memcache-2.2.6.tgz … Starting to download memcache-2.2.6.tgz (35,957 bytes) ……….done: 35,957 bytes 11 source files, building WARNING: php_bin /data1/server/php-cgi/bin/php appears to have a suffix -cgi/bin/php, but config variable php_suffix does not match running: phpize Configuring for: PHP Api Version: 20100412 Zend Module Api No: 20100525 Zend Extension Api No: 220100525 Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.
Build process completed successfully Installing ‘/data1/server/php-cgi/lib/php/extensions/no-debug-non-zts-20100525/memcache.so’ install ok: channel://pecl.php.net/memcache-2.2.6 configuration option “php_ini” is not set to php.ini location You should add “extension=memcache.so” to php.ini 安装提示把extension=memcache.so 这句话加入php.ini就成功了,测试一下,代码如下:
<?php $mem = new Memcache; $mem->connect(’211.144.xx.xx’, 11211); $mem->set(‘key’, ‘This is a test!’, 0, 60); $val = $mem->get(‘key’); echo $val; //phpfensi.com ?> 是不是成功了.