400 028 6601

建站动态

根据您的个性需求进行定制 先人一步 抢占小程序红利时代

php连接memcached-创新互联

     或者指定新的位置,我以下是指定新的位置

[root@localhost memcache-2.2.3]# make install
Installing shared extensions:    /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/
[root@localhost memcache-2.2.3]# ls /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/
memcache.so

[root@localhost memcache-2.2.3]# vim /usr/local/php/etc/php.ini

php连接memcachedphp连接memcached

[root@localhost memcache-2.2.3]# ls /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/
memcache.so

[root@localhost memcache-2.2.3]# mkdir /usr/local/php/ext  #创建目录

[root@localhost memcache-2.2.3]# cp /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/memcache.so   /usr/local/php/ext/

[root@localhost memcache-2.2.3]# ls !$
ls /usr/local/php/ext/
memcache.so

[root@localhost memcache-2.2.3]# vim /usr/local/php/etc/php.ini

php连接memcached

[root@localhost memcache-2.2.3]# /usr/local/php/bin/php -m|grep memcache
memcache

[root@localhost memcache-2.2.3]# curl www.apelearn.com/study_v2/.memcache.txt > 1.php 2>/dev/null

下载一个1.php文件

[root@localhost memcache-2.2.3]# /usr/local/php/bin/php 1.php
Get key1 value: This is first value
Get key1 value: This is replace value
Get key2 value: Array
(
   [0] => aaa
   [1] => bbb
   [2] => ccc
   [3] => ddd
)

Get key1 value:
Get key2 value:
[root@localhost memcache-2.2.3]#

php连接memcached

[root@localhost memcache-2.2.3]# /usr/local/php/bin/phpize

Configuring for:
PHP Api Version:        20090626
Zend Module Api No:     20090626
Zend Extension Api No:  220090626
Cannot find autoconf. Please check your autoconf installation and the

$PHP_AUTOCONF environment variable. Then, rerun this script.

此时没有生成configure文件。

解决方法:

# cd /usr/src
# wget http://ftp.gnu.org/gnu/m4/m4-1.4.9.tar.gz
# tar -zvxf m4-1.4.9.tar.gz
# cd m4-1.4.9/
# ./configure && make && make install
# cd ../
# wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.62.tar.gz
# tar -zvxf autoconf-2.62.tar.gz
# cd autoconf-2.62/
# ./configure && make && make install
或者更简单的办法是:
# yum install m4
# yum install autoconf

另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


分享标题:php连接memcached-创新互联
标题URL:http://www.bluegullmedia.com/article/dpdjso.html

其他资讯

让你的专属顾问为你服务

0.3351s