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

你可能感兴趣的:(memcached)