PHP5.6安装memcache
注:
1.PHP版本为5.6
2.memcache是1.45版本前的版本
步骤
1.下载memcached.exe文件
以下提供的是菜鸟教程的下载链接
32位系统 1.2.5版本:http://static.runoob.com/download/memcached-1.2.5-win32-bin.zip
32位系统 1.2.6版本:http://static.runoob.com/download/memcached-1.2.6-win32-bin.zip
32位系统 1.4.4版本:http://static.runoob.com/download/memcached-win32-1.4.4-14.zip
64位系统 1.4.4版本:http://static.runoob.com/download/memcached-win64-1.4.4-14.zip
32位系统 1.4.5版本:http://static.runoob.com/download/memcached-1.4.5-x86.zip
64位系统 1.4.5版本:http://static.runoob.com/download/memcached-1.4.5-amd64.zip
安装方法:https://www.runoob.com/memcached/window-install-memcached.html
2.下载php_memcache.dll
下载链接:(版本为5.3——5.6)https://windows.php.net/downloads/pecl/releases/memcache/3.0.8/
注意:64位的php_memcache.dll,不会安装成功,phpinfo()搜不到memcache。
(1)将下载好的php_memcache.dll放入php/ext下
(2)在php.ini中添加extension=php_memcache.dll
(3)重启apache,写一个phpinfo(),查看是否有memcache,如图
3.测试memcache是否有效
<?php $memcache = new Memcache; //创建一个memcache对象 $memcache->connect('localhost', 11211) or die ("Could not connect"); //连接Memcached服务器 $memcache->set('key', 'test'); //设置一个变量到内存中,名称是key 值是test $get_value = $memcache->get('key'); //从内存中取出key的值 echo $get_value; ?>
- centOS 5.6 编译安装Memcached 与Memcache的PHP扩展
- [shell]CentOS 5.6安装web服务及相关软件(php 5.3, MySQL Server, memcache, spawn-fcgi, nginx, coreseek)
- PHP5.6的安装及redis、memcache、mongo扩展
- [shell]CentOS 5.6安装web服务及相关软件(php 5.3, MySQL Server, memcache, spawn-fcgi, nginx, coreseek)
- centos 下安装 php 5.6,测试方法可用
- ubuntu 16.04 卸载php7.0 安装 php5.6
- CENTOS+ORACLE+APACHE+GD+PHP+MYSQL+WSF+Memcache完整安装
- Windows下Memcache的安装及PHP扩展配置方法
- Centos下Yum安装PHP5.5,5.6,7.0
- php5.6安装
- php5.6+Redis+Windows7安装 (phpstudy)
- CentOS 7 安装 PHP 7.0以及memcache和redis扩展
- Centos下Yum安装PHP5.5,5.6,7.0
- IIS6配置和PHP5.6环境安装
- 【工具安装】-CentOS源码安装php5.6
- windows下php5.5.12安装Memcache扩展
- 在CentOS release 5.6上安装gearman及php扩展错误记录
- 在Kali Linux 2016.2下安装Discuz需要安装php5.6
- MAC下安装php扩展memcache
- centos 下memcached 构建以及php memcache安装