Installing memcache in Windows 7 (XAMPP)

I'm using Windows 7, 64 bits, and PHP 5.3.5.

memcache is showing as this in phpinfo:

Active persistent connections: 0
Version: 2.2.5
Revision: $Revision: 1.114 $ 

And I'm also getting a connection error Notice: Memcache::get() [memcache.get]: Server localhost (tcp 11211) failed

This is what I did:

1) I installed and ran the 64 bit memcached service: http://s3.amazonaws.com/downloads.northscale.com/memcached-win64-1.4.4-14.zip.

2) I copied php_memcache.dll (https://thinkam.googlecode.com/files/php_memcache-cvs-20090703-5.3-VC6-x86.zip) into php/ext.

3) I added extension = php_memcache.dll in php.ini.

4) I restarted XAMPP.

What could I be missing?

* Update *

Memcache seems to be listening now on port 11211, but now from my application I get the following error:

Notice: Memcache::get() [memcache.get]: Server 127.0.0.1 (tcp 11211) failed with: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (10060)


您必须在Windows Control Panel->Administration->Services运行memcached server


运行path/memcache.exe -d start并确保启动了memcache


As @Gigala say in comments you can get another php_memchace.dll for different php versions from here http://windows.php.net/downloads/pecl/releases/memcache/3.0.8

Download the extension for your php version following this example:

php_memcache-3.0.8-5.3-nts-vc9-x86.zip as "5.3" must be your php version

This works for me

链接地址: http://www.djcxy.com/p/18282.html

上一篇: 为什么Internet Explorer与后退按钮上的预期功能不同?

下一篇: 在Windows 7中安装Memcache(XAMPP)