Windows 7 64 位 xampp 上的 phpredis [英] phpredis on windows 7 64bit xampp

查看:35
本文介绍了Windows 7 64 位 xampp 上的 phpredis的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于开发目的,我正试图让 Redis 在我的 Windows 机器上运行.我已经使用 phpredis 客户端在我的 Ubuntu 10.04 服务器上启动并运行了 Redis.

I'm trying to make Redis work on my windows machine for development purposes. I already made Redis up and running on my Ubuntu 10.04 server with phpredis client.

目前在我的 windows 机器上我可以启动 Redis 服务器,因为它不需要安装并且对于开发来说已经足够了,但是我不知道如何安装 phpredis.看起来很混乱,我已经花了两天时间在做这个,但没有结果.

At the moment on my windows machine i can start Redis server, because it requires no installation and it is good enaugh for development, but I can't figure out how to install phpredis. It seems very confusing, I already spend two days working on this and no result.

我已经用 Git 克隆了源文件,但我是用 Git Bash 做到的,但这是最后一个与 ubuntu 工作方式相同的命令.我还下载了两个 .dll 文件,一个带有ts",另一个带有nts",不知道有什么区别:/

I have cloned source files with Git, but i did that using Git Bash, but that was last command who worked in the same way as ubuntu. I also have downloaded two .dll files, one with 'ts' and another with 'nts', have no idea what is the difference :/

http://commandperls.com/install-phpredis/有如何安装 phpredis 的手册,但它仅适用于我的 ubuntu.我是命令行的新手,我不确定这是否适用于 Windows,例如 cmd 或 git bash.

http://commandperls.com/install-phpredis/ there is manual how to install phpredis, but it works only on ubuntu for my. I'm very newbie for a command line and I'm not sure if this even suppose to work on windows, like with cmd or git bash.

所以我的问题是,如何让 phpredis 在 Windows 上运行?有没有办法做到这一点?我知道有 Predis 并且我已经尝试过那个,但是因为我打算在我的服务器上使用 phpredis,所以我想在开发机器上使用它.

So my question is, how can I make that phpredis work on windows? Is there is any way to make that happen? I know there is Predis and I already tried that one, but because I'm planning to use phpredis on my server, i would like to use same on development machine.

推荐答案

找到了!为误解道歉,但所有这些情况对于对服务器管理如此了解的人来说真的很困惑.无论如何,以下是我的解决方案.

Found it! Apologizing for misapprehension, but all this situation is really confusing for guy who such a little about servers management. Anyway, below is my solution.

http://code.google.com/p/pecl-win/downloads/detail?name=php_redis-2.1.3-5.3-ts.dll&can=2&q=

上面的链接提供了 .dll 文件,在我的情况下必须将其复制到:C:xamppphpext 并在 php.ini 文件中添加一行 extension=php_redis.dll 最后重启 apache2 服务.

Link above provides .dll file, which in my case must be copied to: C:xamppphpext and add a line in to php.ini file extension=php_redis.dll and lastly restart apache2 service.

就是这样,什么都不需要安装,只要 redis 服务器已经启动并运行,这将提供 php 和 redis 之间的连接!

And that's it, nothing has to be installed, as long as redis server already up and running this will provide connection between php and redis!

2020-05-06 更新

似乎以前的 url 只包含过时的 .dll 文件.@Niz 在评论中提供了一个更新的 url,您可以在其中为您的 Windows 下载正确版本的 redis DLL.确保下载与您的 redis 和 php 版本匹配的那个.

Seems like previous url only contains outdated .dll files. @Niz provided in the comments an updated url where you can download the correct version of redis DLL for your windows. Make sure to download the one that matches your redis and php versions.

https://pecl.php.net/package/redis

这篇关于Windows 7 64 位 xampp 上的 phpredis的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆