By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,950 Members | 989 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,950 IT Pros & Developers. It's quick & easy.

memcache not connecting

P: n/a
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
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!

May 29 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

be*******@gmail.com wrote:
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)
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: http://jehiah.cz/projects/memcached-win32/ 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 <htmlpurifier.org Anti-XSS HTML Filter
[[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGXMk0qTO+fYacSNoRAnu3AJ9CdxNqfWonmTaDje8+Lq fk5f80IwCeMSKw
2tZg1MrkxvlT5lYBH/lkEWY=
=8u9R
-----END PGP SIGNATURE-----
May 30 '07 #2

P: n/a
Ed - that was the problem, thanks. We installed memcache, started the
daemon and everything is working very well.

Thanks again for the response.
On May 29, 7:45 pm, "Edward Z. Yang" <edwardzy...@thewritingpot.com>
wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

berksh...@gmail.com wrote:
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)

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:http://jehiah.cz/projects/memcached-win32/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 <htmlpurifier.org Anti-XSS HTML Filter
[[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org

iD8DBQFGXMk0qTO+fYacSNoRAnu3AJ9CdxNqfWonmTaDje8+Lq fk5f80IwCeMSKw
2tZg1MrkxvlT5lYBH/lkEWY=
=8u9R
-----END PGP SIGNATURE-----

Jun 5 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.