在 Windows 10 64 下安装 Memcached,安装 PHP 7.0.22 的 Memcache 扩展
1、之前写过一篇在 PHP 5.6.27 下的博客:http://www.shuijingwanwq.com/2017/09/11/1892/ ,此次是 PHP 7.0.22 下的,如图1
图1
2、卸载 memcached ,可以使用以下命令:,如图2
schtasks /delete /tn memcached
图2
3、删除目录:C:\memcached-1.4.5,如图3
图3
4、打开网址:https://github.com/nono303/memcached/tree/master/cygwin/x64 ,下载:cygevent-2-0-5.dll、cygwin1.dll、memcached-1.5.1.exe,如图4
图4
5、下载成功后,复制至:C:\memcached-1.5.1,如图5
图5
6、以管理员身份运行 Windows PowerShell,如图6
图6
7、执行以下命令将 memcached 添加来任务计划表中:,如图7
schtasks /create /sc onstart /tn memcached /tr “‘C:\memcached-1.5.1\memcached-1.5.1.exe’ -m 512”
图7
8、打开网址:https://github.com/nono303/PHP7-memcache-dll ,选择vc14,如图8
图8
9、查看 phpinfo,编译器为MSVC14,且线程安全,如图9
图9
10、打开网址:https://github.com/nono303/PHP7-memcache-dll/tree/master/vc14/x64/ts ,下载:php-7.0.x_memcache.dll,如图10
图10
11、将 php-7.0.x_memcache.dll 复制至:C:\php-7.0.22\ext\php_memcache.dll,如图11
图11
12、在 C:\php-7.0.22\php.ini 中添加以下行以启用memcache扩展,如图12
extension=php_memcache.dll
图12
13、查看 phpinfo,memcache已经存在,如图13
图13
14、新建测试程序:memcached.php,如图14
图14
<?php $memcache = new Memcache;
$memcache->connect('localhost', 11211) or die ("Could not connect"); $version = $memcache->getVersion();
echo "Server's version: ".$version."<br/>\n"; $tmp_object = new stdClass;
$tmp_object->str_attr = 'test';
$tmp_object->int_attr = 123; $memcache->set('key', $tmp_object, false, 10) or die ("Failed to save data at the server");
echo "Store data in the cache (data will expire in 10 seconds)<br/>\n"; $get_result = $memcache->get('key');
echo "Data from the cache:<br/>\n"; var_dump($get_result); ?>
15、在重启机器后,运行测试程序,报错:Notice: Memcache::connect(): Server localhost (tcp 11211, udp 0) failed with:,如图15
图15
16、打开任务计划程序,编辑 memcached 的触发器,从启动时修改为登录时,如图16
图16
17、此时,memcached 的触发器已经为:当任何用户登录时,如图17
图17
18、在重启机器后,显示:C:\memcached-1.5.1\memcached-1.5.1.exe 命令行窗口,说明计划任务成功执行,如图18
图18
19、运行测试程序,正常,如图19
图19
20、希望在系统启动时,不要显示命令行窗口,更改用户或组,如图20
图20
21、在弹出的选择用户或组窗口中,我们选择高级 – 立即查找 – 选择 SYSTEM,点击确定,如图21
图21
22、运行任务时,请使用下列用户帐户,已为:SYSTEM,如图22
图22
23、在重启机器后,未显示:C:\memcached-1.5.1\memcached-1.5.1.exe 命令行窗口,且运行测试程序,正常,如图23
图23
在 Windows 10 64 下安装 Memcached,安装 PHP 7.0.22 的 Memcache 扩展的更多相关文章
- windows 10 64位机器上 安装部署
mi这个博客写的不错 https://www.cnblogs.com/dingguofeng/p/8709476.html 安装redis 可视化工具后 ,新建连接 名称随意,注意端口号是否有误默认6 ...
- windows 10 64bit下安装Tensorflow+Keras+VS2015+CUDA8.0 GPU加速
原文地址:http://www.jianshu.com/p/c245d46d43f0 写在前面的话 2016年11月29日,Google Brain 工程师团队宣布在 TensorFlow 0.12 ...
- tensor搭建--windows 10 64bit下安装Tensorflow+Keras+VS2015+CUDA8.0 GPU加速
windows 10 64bit下安装Tensorflow+Keras+VS2015+CUDA8.0 GPU加速 原文见于:http://www.jianshu.com/p/c245d46d43f0 ...
- Windows和Centos下Docker的安装配置
Windows和Centos下Docker的安装配置 windows环境下的安装(win10) 在Windows系统上需要利用toolbox来安装Docker,现在 Docker 有专门的 Win10 ...
- windows Sever 2012下Oracle 12c安装配置方法图文教程
windows Sever 2012下Oracle 12c安装配置方法图文教程 Oracle 12c安装配置方法图文教程,具体内容如下 1.我们开启虚拟机 2.Windows Sever 2012启动 ...
- windows 10中的ubuntu子系统安装桌面环境的方法
windows 10中的ubuntu子系统安装桌面环境的方法 (How to install Ubuntu-desktop in windows 10 Subsystem for Linux) 转载 ...
- CentOS-7 在windows server 2012下的虚拟机安装教程
CentOS-7 在windows server 2012下的虚拟机安装教程 一.下载 CentOS-7-x86_64-DVD-1611.iso https://mirrors.aliyun.com/ ...
- 笔记:在 Windows 10 WSL Ubuntu 18.04 安装 Odoo12 (2019-06-09)
笔记:在 Windows 10 WSL Ubuntu 18.04 安装 Odoo12 原因 为了和服务器一样的运行环境. 使用 Ubuntu 运行 Odoo 运行更快. 方便使用 Windows 10 ...
- 如何解决Windows 10系统下设备的声音问题
如何解决Windows 10系统下设备的声音问题? 请阅读下面的说明来解决Windows 10设备上的声音问题. 1. 检查设备管理器 打开开始菜单,键入设备管理器, 从出现的结果中选择并打开它. 在 ...
随机推荐
- jq判断上下滚动
$(document).ready(function(){ var p=0,t=0; $(window).scroll(function(e){ p = $(this).scrollTop(); if ...
- CF916C Jamie and Interesting Graph
思路:构造 实现: #include <bits/stdc++.h> using namespace std; int main() { int n, m; cin >> n ...
- [BZOJ1025][SCOI2009]游戏 DP+置换群
题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=1025 题目中的排数就是多少次回到原来的序列.很显然对于题目所描述的任意一种对应法则,其中一 ...
- Android学习笔记-事件处理之Handler消息传递机制
内容摘要:Android Handler消息传递机制的学习总结.问题记录 Handler消息传递机制的目的: 1.实现线程间通信(如:Android平台只允许主线程(UI线程)修改Activity里的 ...
- 调试SQL Server的存储过程及用户定义函数
分类: 数据库管理 2005-06-03 13:57 9837人阅读 评论(5) 收藏 举报 sql server存储vb.net服务器sql语言 1.在查询分析器中调试 查询分析器中调试的步骤如下: ...
- webpack3整理(第二节/满三节)
消除未使用的CSS:安装PurifyCSS-webpack插件 cnpm i purifycss-webpack purify-css -D const glob = require('glob'); ...
- flex布局(主要分清楚容器和条目)
设置在容器上面的属性:flex-direction.flex-wrap.flex-flow.justify-content.align-items.align-content1.flex-direct ...
- 迅为嵌入式开发板iTOP-6818开发板八核Cortex-A53架构,满足各种产品需求
性价比更高 内存:1G(可选2G);存储:16G;4418:四核 Cortex-A9;6818:八核Cortex-A53. 功能更强 板载4G(全网通),GPS,WIFI,千兆以太网,重力加速度计等, ...
- leetcode_238. Product of Array Except Self_思维
https://leetcode.com/problems/product-of-array-except-self/ 给一个vector<int> nums,输出一个vector< ...
- Android 关于文件及文件夹的创建 、删除、重命名、复制拷贝
package com.example.administrator.myapplication.util; import java.io.BufferedReader;import java.io.B ...