开发者

cannot store values into memcache

I am running apache+php+memcache on suse 10开发者_StackOverflow中文版.1.

I can connect Ok to memcached on port 11211, but I cannot do getVersion, add, get, etc.

Error message:

[Thu Jan 21 14:38:15 2010] [error] [client ] PHP Notice: Memcache::add() [function.Memcache-add]: Server localhost (tcp 11211) failed with: Failed reading line from stream (0) in /testmem/index.php on line 13

How can I debug this?


Try with 127.0.0.1. Make sure your firewall allows connecting to port 11211. Make sure your Memcached server is up and running on port 11211.


You may be running memcached without ASCII protocol support, such as if you ran:

$ memcached -B binary

If this is the case, remove the -B argument entirely, and PHP and telnet should work.

It is also possible that your memcached was compiled with SASL support enabled, which disabled the ASCII protocol that PHP requires to connect to memcached.

This would explain why it is running, but you cannot issue ASCII commands through telnet (or PHP).

You could test this by running:

$ memcached -S

You should see this output if memcached wasn't compiled with SASL: "This server is not built with SASL support."

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜