Memcache connects but doesn't respond to any command

前端 未结 2 502
[愿得一人]
[愿得一人] 2021-01-01 07:05

Setup: Apache; PHP 5.2.9; libevent (for memcached it\'s required) version 1.3; memcached server version 1.2.2 (tried 1.4.5, 1.4.0, now downgraded to 1.2.2,

相关标签:
2条回答
  • 2021-01-01 07:39

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

    0 讨论(0)
  • 2021-01-01 07:41

    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!

    0 讨论(0)
提交回复
热议问题