沃梦达 / 编程问答 / php问题 / 正文

如何:在 XAMPP 上安装 Memcache (Windows 7/8/10)

HOW TO: Install Memcache on XAMPP (Windows 7/8/10)(如何:在 XAMPP 上安装 Memcache (Windows 7/8/10))

本文介绍了如何:在 XAMPP 上安装 Memcache (Windows 7/8/10)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 Laravel 上做一个项目.我正在尝试制作一个简单的系统,该系统使用专注于 memcache 的缓存.刚开始学习的时候,先查看了Laravel站点,发现使用Memcached缓存需要安装Memcached PECL包.

I am doing a project on Laravel. I'm trying to make a simple system that uses cache focused on memcache. When I started studying, I checked Laravel site first and then I found that using the Memcached cache requires the Memcached PECL package to be installed.

我搜索了一下,在安装过程中遇到了一些问题.

I searched through it and I got some problems during installation.

如何安装memcache?

推荐答案

以下是安装 memcache 时应遵循的步骤.

Here are the steps that should be followed when you install memcache.

  1. 启动您的 xampp.
  2. 点击配置"并打开 php.ini 文件.

搜索

;extension=php_memcache.dll

如果没有找到就添加

extension=php_memcache.dll
[Memcache]
memcache.allow_failover = 1
memcache.max_failover_attempts=20
memcache.chunk_size =8192
memcache.default_port = 11211

3.从 php_memecache.dll-vc11-x86.zip" rel="noreferrer">windows.php.net(一定要检查你的php版本和php_memcache.dll是否一致,否则会报错.)

3. download the file php_memecache.dll from windows.php.net (make sure to check your php version and php_memcache.dll are same. Otherwise, it will through error.)

解压并将.dll"文件粘贴到路径xamppphpext中,在我的例子中它是F:xamppphpext(我不得不将文件重命名为 memcache.dll 但是当您查看描述此步骤的其他网站时,他们没有告诉重命名,但我有在我的项目中完成了这个!).

unzip it and paste '.dll' file in the path xamppphpext, in my case it is F:xamppphpext (I had to rename the file to memcache.dll but when you take a look on other sites that describes the steps for this, they don't tell to rename, but I have done this in my project!).

  1. 下载并安装 Windows 版 Memcache 服务器

从 Memcache.exe>果冻

下载完成后,解压 memcache.exe 文件并将其放入您选择的任何所需目录(例如 C:/memcached/).确保文件夹名称应为 memcached

After completion of download, unzip and put the memcache.exe file into any desired directory of your choice (e.g. C:/memcached/). make sure folder name should be memcached

  1. 使用以管理员身份运行"打开cmd提示符并执行安装行
  1. Open the cmd prompt with "Run as Administrator" and execute the line to install

c:/memcached/memcached.exe -d install

然后输入

net start "memcached server"

如果您已经安装了 memcache.然后只需通过 net start "memcached server" 行.

In case you get memcache is already installed. then just go through line net start "memcached server".

出于安装目的,您可以转到复制 memcache.exe 的路径.并双击该文件,memcache 已安装,现在只需添加行 net start "memcached server" 并启用您的 memcache.

For the installation purpose you can go to the path where you have copied the memcache.exe. and double click to the file, memcache is installed, now just add line net start "memcached server" and your memcache is enabled.

  1. 重启 Xampp Apache

  1. Restart Xampp Apache

重启 Memcached:

Restart Memcached:

<代码>C:Windowssystem32>net start memcached"

memcached 服务正在启动.memcached 服务启动成功.

<代码>C:Windowssystem32>网络停止memcached"

memcached 服务正在停止.memcached 服务已成功停止.

这篇关于如何:在 XAMPP 上安装 Memcache (Windows 7/8/10)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:如何:在 XAMPP 上安装 Memcache (Windows 7/8/10)

基础教程推荐