Something
Emporium

Memcached on Windows Vista

Memcached on Windows Vista

If you're planning to use the Windows port of Memcached, be careful how you connect to the server in your code. Using the PHP memcache extension, I tried to connect to localhost:
$memCache->connect('localhost', 11211);
$memCache->set('test', 'Hello, Memory!');
But I couldn't connect. I kept receiving error 10060 - "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." I checked with netstat, and Memcached was indeed listening on 0.0.0.0:11211. In the end it turned out that localhost was resolving to ::1: (IPV6) rather than the more traditional 127.0.0.1 (IPV4). Specifying the local IP address ('127.0.0.1') instead of 'localhost' fixed everything.

(Sidenote for New Zealanders: This sounds like a "get better work stories" advertisement. At first we thought there might have been a compatibility issue, but, in the end, it turned out to be, uh, the refresh rate.)
Dominic

Comments

How did u install memcached on Windows Vista?
I tried to run the command > memcached.exe -d install
with the memcache Win32 binaries but I got the following error message -
failed to install service or service already installed
Neeti
Are you sure the service isn't already installed then? Have you checked in the management console for a Memcached entry (run 'services.msc' from the run entry in the start menu)?
Dominic
Smart Guy!
Naim
Thanks Dominic.
Moody
Thanks mate,

I was about to give up...

Sim
Thank you! This solution is for Windows 7 too.
zero.module
Thanks Dominic....