繁体   English   中英

在Windows 7(XAMPP)中安装memcache

[英]Installing memcache in Windows 7 (XAMPP)

我使用的是Windows 7,64位和PHP 5.3.5。

memcache在phpinfo中显示如下:

Active persistent connections: 0
Version: 2.2.5
Revision: $Revision: 1.114 $ 

而且我也收到连接错误Notice: Memcache::get() [memcache.get]: Server localhost (tcp 11211) failed

这就是我做的:

1)我安装并运行了64位memcached服务: http//s3.amazonaws.com/downloads.northscale.com/memcached-win64-1.4.4-14.zip

2)我将php_memcache.dll( https://thinkam.googlecode.com/files/php_memcache-cvs-20090703-5.3-VC6-x86.zip )复制到php / ext中。

3)我在php.ini中添加了extension = php_memcache.dll

4)我重启了XAMPP。

我能错过什么?

*更新*

Memcache似乎正在侦听端口11211,但现在从我的应用程序中我收到以下错误:

注意:Memcache :: get()[memcache.get]:服务器127.0.0.1(tcp 11211)失败:连接尝试失败,因为连接方在一段时间后没有正确响应,或者由于连接主机而建立连接失败未能回应。 (10060)

您必须在Windows Control Panel->Administration->Services运行memcached server

运行path/memcache.exe -d start并确保启动memcache

正如@Gigala在评论中所说,你可以从这里得到另一个php_memchace.dll for php php http://windows.php.net/downloads/pecl/releases/memcache/3.0.8

按照以下示例下载php版本的扩展:

php_memcache-3.0.8-5.3-nts-vc9-x86.zip“5.3”必须是你的php版本

这适合我

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM