如何在Windows for PHP中安装和使用memcached?

问题描述:

我已经在Windows 7中安装了memcached二进制文件,并将其作为服务器启动.

I have installed memcached binary file in Windows 7 and started it as server.

当我输入wmic进程得到描述时,exetuablepath | findstr memcached.exe我得到了响应:在命令行上是memcached.exe c:\ memcached \ memcached.exe.

When I type wmic process get description, exetuablepath | findstr memcached.exe I get the response: memcached.exe c:\memcached\memcached.exe on command line.

当我尝试在php.net上运行示例代码时,我进入了浏览器:

When I try running the sample code on php.net, I get on my browser:

严重错误:在第3行的C:\ DocumentRoot \ Framework \ index.php中找不到类"Memcache"调用堆栈:0.0010 335928 1. {main}()C:\ DocumentRoot \ Framework \ index. php:0

那么,我做错了什么?我正在使用memcache.dll,因为我认为Windows不存在memcached.dll吗?

So, what is it that I am doing wrong? I am using memcache.dll since memcached.dll does not exist for Windows I believe?

这是给将来的访问者的!

This is for future vistors!

  1. 检查phpinfo()并查看是否列出了它.
  2. 如果没有,请检查是否在php.ini中启用了扩展名,然后检查apache错误日志中是否存在 错误信息! dll应该使用与php相同的编译器 是. (VC9或VC6)顺便说一句,memcache.dll很好
  1. check phpinfo() and see if it's listed.
  2. If not, check whether extension is enabled in php.ini and then check apache error logs for error message! dll should be complied with the same compiler the php is. (VC9 or VC6) btw, memcache.dll is fine

您可以在此处获取php扩展名"memcache",以在Windows上的php中使用memcached. http://downloads .php.net/pierre/

You can get the php extension "memcache" to use memcached with php on windows here http://downloads.php.net/pierre/

Memcached是服务器守护程序,您可以在Windows中获取它 http://splinedancer.com/memcached -win32/

Memcached is the server daemon and you can get it for windows here http://splinedancer.com/memcached-win32/