memcache_connect() [function.memcache-connect]: Can’t connect to localhost:11211
May 11th, 2009 • memcache, memcached, php, snippets
Encountered this error? It could be as simple as switching the host from localhost to 127.0.0.1
before:
<?php
$memcache_obj = memcache_connect('localhost', 11211);
after:
<?php
$memcache_obj = memcache_connect('127.0.0.1', 11211);
You might also want to look at these posts
One Response (Add Your Comment)
-
spaniard June 9, 2009at 4:30 pm
It works! Thanks a lot