为什么 memcache 无法与 debian 7 中的 elgg 一起运行?

为什么 memcache 无法与 debian 7 中的 elgg 一起运行?

我正在将一个 php 网站(使用 elgg - www.elgg.org 构建)从 CentOS 服务器移动到不同的 Debian 7 服务器,并且在两台服务器上都安装了 memcached + php5-memcache。

我已经在 Debian 7 机器上重新创建了我所知道的所有必要的设置步骤,以激活 memcache 并让 php 站点使用它 - 但是,当我查看该站点时,我在日志中看到以下内容:

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

据我所知(并基于在线阅读其他相关帖子),php 代码无法连接到 memcache 服务器进程。php 应用程序和 memcache 服务器进程位于同一台服务器上,我查看了 hosts 文件以确保已localhost列出127.0.0.1

localhost将elgg 代码中的引用更改为127.0.0.1没有任何区别。

我现在没有主意了。有人知道我可能错过了什么吗?

相关内容