memcache not connecting

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
memcache appears to be installed correctly, but when I use
memcache_connect I get the following error:
Warning: memcache_connect(): Can't connect to localhost:11211, Unknown
error (0)

I'm connecting using the following command:
$memcache_obj = memcache_connect('localhost', 11211);

Memcache info from phpinfo():
memcache support enabled
Active persistent connections  0
Revision  $Revision: 1.53 $

Directive Local Value Master Value
memcache.allow_failover 1 1
memcache.chunk_size 8192 8192
memcache.default_port 11211 11211

Finally, var_dump(extension_loaded('memcache')); returns true.

Any help is greatly appreaciated!

Re: memcache not connecting

Hash: SHA1 wrote:
Quoted text here. Click to load it

You need to have the memcached daemon running. The extension itself only
offers an API for memcached.

If you're on Windows, you can get binaries that can register themselves
as Services at: Careful
though: the nature of memcached means it gobbles up quite a bit of
memory, so don't run it when you don't need to.

- --
 Edward Z. Yang                        GnuPG: 0x869C48DA
 HTML Purifier  <>  Anti-XSS HTML Filter
 [[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla -


Re: memcache not connecting

Kimmo Laine wrote:
Quoted text here. Click to load it

Unless next_page.php generates PHP, the script with this include will
only get HTML.

Quoted text here. Click to load it


    if (isset($_GET['foo'])) {
      echo '<?php echo $_GET[\'foo\']; ?>';
    } else {
      echo '<?php echo \'Not available\'; ?>';

File not found: (R)esume, (R)etry, (R)erun, (R)eturn, (R)eboot

Site Timeline