Memcache connects but doesn't respond to any command

守給你的承諾、 提交于 2019-11-30 10:31:32

To whom it might be interesting.

Issue resolved.

Here is where problem was(maybe it would help authors from 2 related treads).

On shared hosting sometimes you shouldn't use 127.0.0.1. Instead, use site's IP address.

So changing

memcached -d -m 1024 -u root -l 127.0.0.1 -p 11211

to

memcached -d -m 1024 -u root -l 123.456.789.123 -p 11211

and PHP code from

$memcache->pconnect("127.0.0.1",11211);

to

$memcache->pconnect("123.456.789.123",11211);

fixed the issue.

Thanks everyone!

I would talk to your sys sadmin. I think the there maybe a firewall involved.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!