I am moving a php website (built using elgg - www.elgg.org) from a CentOS server to a different Debian 7 server and have installed memcached + php5-memcache on both.
I have recreated all the necessary setup steps that I am aware of on the Debian 7 machine to activate memcache and get the php site to use it - however, when I view the site, I see the following in the logs:
PHP WARNING: "Memcache::getversion(): php_network_getaddresses: getaddrinfo failed: Name or service not known" in file /mysite/ElggMemcache.php (line 88)
PHP message: "Memcache::getversion(): php_network_getaddresses: getaddrinfo failed: Name or service not known" in file /mysite/engine/classes/ElggMemcache.php (line 88)" while reading response header from upstream, client: 127.0.0.1, server: mysite.com
From what I can tell (and based on reading other related threads online) - the php code is not able to connect to the memcache server process. The php app and the memcache server process are on the same server and I have looked in the hosts file to ensure that localhost
is listed against 127.0.0.1
.
Changing the localhost
reference within the elgg code to 127.0.0.1
didn't make any difference.
I am out of ideas now. Does anyone know what I could have missed?