phpredis on windows 7 64bit xampp

寵の児 提交于 2019-12-21 03:39:18

问题


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.

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.

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/ 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.

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.


回答1:


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=

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

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!




回答2:


You can still find up to date compiled dll binaries of Redis(and many more) at the following location: http://windows.php.net/downloads/pecl/releases/redis/2.2.7/

    # php -i | find "Architecture"
    # php -i | find "Thread"



回答3:


This worked for me :

Answer Referred from this Article : https://www.linkedin.com/pulse/using-redis-windows-php-shekhar-joshi/

Check all the information from phpinfo() such as x86 , php version and Thread Safety.

Useful Portion from the Article :

Download PECL extension from https://pecl.php.net/package/redis/2.2.7/windows , you need to know which version would work for you. First of all check out your php version and know whether thread safety is enabled or not(you can do this by using phpinfo()). Download the appropriate version of the dll, for thread safety enabled use ts version otherwise use nts version. Extract the contents and copy the .dll file in xamp/php/ext. Next, open the php.ini file located at(xampp/php) and add this string extension="php_redis.dll" together with other extensions.




回答4:


Php 7 with redis support for xammp there are new binaries available in: https://windows.php.net/downloads/pecl/releases/redis/



来源:https://stackoverflow.com/questions/10178600/phpredis-on-windows-7-64bit-xampp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!