一.php安装redis扩展
 
1.使用phpinfo()函数查看PHP的版本信息,这会决定扩展文件版本
 
 
 

2.根据PHP版本号,编译器版本号和CPU架构,

选择php_redis-2.2.5-5.6-ts-vc11-x64.zip和php_igbinary-1.2.1-5.5-ts-vc11-x64.zip

下载地址:

http://windows.php.net/downloads/pecl/snaps/redis/2.2.5/

http://windows.php.net/downloads/pecl/releases/igbinary/1.2.1/
 
 
3.解压缩后,将php_redis.dll和php_igbinary.dll拷贝至php的ext目录下
 
 

4.修改php.ini,在该文件中加入:

; php_redis

extension=php_igbinary.dll

extension=php_redis.dll

注意:extension=php_igbinary.dll一定要放在extension=php_redis.dll的前面,否则此扩展不会生效;
    php.ini的使用路径具体查看phpinfo中的'Loaded Configuration File'的值;
 
 
 
5.重启Apache后,使用phpinfo查看扩展是否成功安装
 

新建一个test.php页面

<?php
    $redis = new Redis();
    $redis->connect('127.0.0.1',6379);
    $redis->set('test','hello redis');
    echo $redis->get('test');
?>
 
hello redis
 
6. 要在Windows中使用redis需要下载Windows版的redis软件
 
 
 
 
二.php安装memcache扩展
 
windows 7 64bit 环境下安装memcached
1、下载后解压到D:\memcached(下载地址:memcached-win64下载地址)
 
 
2、安装到windows服务,打开cmd命令行,进入memcached目录,执行:memcached -d install命令,安装服
如果在没有安装过的情况下,出现"failed to install service or service already installed"错误,则是cmd.exe需要用管理员身份运行。
 
 
3.启动服务,执行:memcached -d start
 
4. 安装PHP Memcache扩展
    下载正确版本的php_memcache.dll动态链接库文件 ,并放在php5.6.16\ext目录下 。
5.编辑php.ini,添加下面一行代码到php.ini文件中。
    extension=php_memcache.dll
6.在phpinfo中查看memcache扩展是否安装成功。
 
 
 

Windows环境下为PHP5.6安装redis扩展和memcached扩展的更多相关文章

  1. 《高可用MySQL》1 – Windows环境下压缩版MySQL安装

    近日在读O’REILIY系列的<高可用MySQL>, 自然少不了主从(Master-Slave)配置和横向扩展相关的内容.Master-Slave这东西吧,在许多公司都是标配,开发中基本天 ...

  2. windows环境下Robot Framework的安装步骤

    Robot Framework是由python编写的开源的用来做功能性测试的自动化测试框架.本文介绍Robot Framework在windows环境下的安装步骤. 安装python从python官网 ...

  3. [转载]在Windows下为PHP5.6安装redis扩展和memcached扩展

    一.php安装redis扩展   1.使用phpinfo()函数查看PHP的版本信息,这会决定扩展文件版本       2.根据PHP版本号,编译器版本号和CPU架构, 选择php_redis-2.2 ...

  4. 在Windows下为PHP5.6安装redis扩展和memcached扩展

    一.php安装redis扩展   1.使用phpinfo()函数查看PHP的版本信息,这会决定扩展文件版本       2.根据PHP版本号,编译器版本号和CPU架构, 选择php_redis-2.2 ...

  5. 在Windows下为PHP5.6安装redis扩展

    Redis 安装 Window 下安装 下载地址:https://github.com/MSOpenTech/redis/releases. Redis 支持 32 位和 64 位.这个需要根据你系统 ...

  6. linux环境下,接着lnmp,安装redis

    linux环境下,安装redis   操作记录: 回到家目录 cd ~查看   ls进入   lump cd lnmp1.3-fullls??? sudo  ./addons.sh //---进入后选 ...

  7. Windows环境下Sybase12.5 图文安装教程

    先准备好安装文件,解压缩ASE install.rar文件,文件夹中包含一个setup.exe可执行文件,双击运行 --- > 欢迎界面出现 下面选择相应国家的协议,我们选择“中华人民共和国”, ...

  8. Windows环境下svn服务器的安装步骤

    做为一个程序开发人员,就算自己一个人写程序,也应该有一个SVN版本控制系统,以便对开发代码进行有效的管理. 下载SVN服务器 下载地址是:http://subversion.apache.org/pa ...

  9. 在Windows下为PHP5.5安装redis扩展

    使用phpinfo()函数查看PHP的版本信息,这会决定扩展文件版本   根据PHP版本号,编译器版本号和CPU架构, 选择php_redis-2.2.5-5.5-ts-vc11-x86.zip和ph ...

随机推荐

  1. git 沙河游戏节点图, 自由沙盒模拟git, 各类交互git命令

    git学习练习总资源链接: https://try.github.io/ (练习已通,有document) 本沙盒游戏教学:https://learngitbranching.js.org/?demo ...

  2. III USP Freshmen ContestH. MaratonIME gets candies

    这题挺有意思的,刚开始不会这交互题,模仿着做了一题就会了,蛮简单 的 这题我用2分,结果wa了,想了一下发现,1到1e9二分50次完全不够用啊,那就转换一下思维,先求出在10^n~10^(n+1)的n ...

  3. HDU 1969 精度二分

    Pie Time Limit: 5000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submiss ...

  4. 简话Angular 00 为什么要学Angular

    一句话: 现在不学Angular的结局,就和5年前不学JQuery一样! 谁学谁知道,早学早进阶! 1. JQuery vs Javascipt 问两个问题: 1) 你用过JQuery吗?当然! 2) ...

  5. poj 3744 概率dp 快速幂 注意排序 难度:2

    /* Scout YYF I Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 5304   Accepted: 1455 De ...

  6. mac下安装apache tomcat

    目录 一. 默认版: 二. 自定义下载配置版: ———————————————————————正文—————————————————————————— 一. 默认版: ##一.mac 自带了apach ...

  7. 在JavaScript中进行文件处理,第二部分:文件读取

    译注:原文是<JavaScript高级程序设计>的作者Nicholas Zakas写的,本翻译纯属为自己学习而做,仅供参考.原文链接:这里 在我的前一篇blog中,我介绍了在JavaScr ...

  8. L188

    This is the view from the instrument deployment camera of InSight, America’s latest probe to Mars, w ...

  9. 探究js正则匹配方法:match和exec

    match是字符串方法,写法为:str.match(reg) exec是正则表达式方法,写法为:reg.exec(str) match和exec在匹配成功时返回的都是数组,在没有匹配上时返回的都是nu ...

  10. mt7601u: probe of xxxx failed with error -2

    /************************************************************************ * mt7601u: probe of xxxx f ...