Home  >  Article  >  Backend Development  >  phpredis - windows下php, redis的插件安装不成功

phpredis - windows下php, redis的插件安装不成功

WBOY
WBOYOriginal
2016-06-06 20:51:331292browse

用的xampp
win7 x64位
php的版本为5.4.4

System Windows NT 6.1 build 7601 (Windows 7 Ultimate Edition Service Pack 1) i586
Build Date Jun 13 2012 21:17:57
Compiler MSVC9 (Visual C++ 2008)
Architecture x86

在https://github.com/nicolasff/phpredis... 下了新的phpredis_5.4_vc9_ts.7z版本, 安装进去, 在phpinfo中没有出现相应插件
查看php error log, 报PHP Warning: PHP Startup: in Unknown on line 0, 应该是不兼容

不知道大家类似环境如何配置redis的,谢谢
(换过5.4.7版本的php亦不能安装成功=_=)

回复内容:

用的xampp
win7 x64位
php的版本为5.4.4

System Windows NT 6.1 build 7601 (Windows 7 Ultimate Edition Service Pack 1) i586
Build Date Jun 13 2012 21:17:57
Compiler MSVC9 (Visual C++ 2008)
Architecture x86

在https://github.com/nicolasff/phpredis... 下了新的phpredis_5.4_vc9_ts.7z版本, 安装进去, 在phpinfo中没有出现相应插件
查看php error log, 报PHP Warning: PHP Startup: in Unknown on line 0, 应该是不兼容

不知道大家类似环境如何配置redis的,谢谢
(换过5.4.7版本的php亦不能安装成功=_=)

PHP5.4.x 的 redis 扩展 php_redis.dll

扩展下载地址:
https://github.com/nicolasff/phpredis/downloads

包含 Non Thread Safe 和 Thread Safe 两个版本

首先把 php_redis.dllphp_igbinary.dll 放入PHP的ext文件夹,
然后在php.ini配置文件里添加如下代码:

<code>extension=php_igbinary.dll  
extension=php_redis.dll
</code>

重启WebServer

注意:
extension=php_igbinary.dll 一定要放在 extension=php_redis.dll 的前面,否则此扩展不会生效。

这里下载 对应版本,我配置没问题的

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn