php+memcached缓存安装说明

http://hi.baidu.com/andylu1988/item/ebb4087b15276d34714423b6

memcache wamp win版本下载地址
https://www.box.com/s/0mybpplvz60f62dveoq7


window 版本下载
http://x32.elijst.nl/php_memcache-5.4-nts-vc9-x86.zip
http://x32.elijst.nl/php_memcache-5.4-vc9-x86.zip

It is the 2.2.5.0 version, I noticed after compiling it (for PHP 5.4.4).

Please note that it is not 2.2.6 but works. I also mirrored them in my own FTP. Mirror links:

http://mustafabugra.com/resim/php_memcache-5.4-vc9-x86.zip http://mustafabugra.com/resim/php_memcache-5.4-nts-vc9-x86.zip

原文地址:http://stackoverflow.com/questions/11883378/class-memcache-not-found-php
或者
http://grokbase.com/t/php/pecl-dev/126x59m1c1/memcache-ext-for-5-4-win-32-bit-zts-vc9-please#20120629frq5tnd2kvnpak349178njqnq0

http://windows.php.net/downloads/pecl/releases/memcache/3.0.7/

win7,php5.4.3版本可用的php_memcache.dll是php_memcache-5.4-vc9-x86
1、将该dll放到php/ext的目录下,设置php.ini,添加extension=php_memcache.dll
2、添加成功重启apache后,在wamp->php->php extensions->php_memcache 会多了php——memcache且是勾选上的。
3、安装memcache。使用CMD跳转到memcache.exe目录。执行memcache.exe -d install 然后执行memcache.exe -d start 若重复执行memcache.exe -d install 会提示
failed to install service or service already installed

启动后就开着命令行窗口。

4、查看是否安装成功。打开phpinfo页面,若有memcache选项。则说明安装成功。否则可能是memcache.dll的版本不匹配当前php版本。请重新下载其它的dll版本。

5、测试
在www下新建一个php文件。内容如下

<?php
$mem = new Memcache;
$mem->connect("127.0.0.1", 11211);
$mem->set('key', 'This is a test!', 0, 60);
$val = $mem->get('key');
echo $val;
?>


若页面输出 This is a test! 说明安装成功!
恭喜!

安装步骤:
http://sanjoyinfoworld.blogspot.hk/2012/02/how-to-install-memcached-in-windows-7.html#sthash.IF2E0AMh.dpbs
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值