且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

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

更新时间:2023-02-11 13:50:57

以下是安装内存缓存时应遵循的步骤.

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 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'文件粘贴到路径 xampp \ php \ ext 中,在我的情况下,它是 F:\ xampp \ php \ ext (我必须将文件重命名为 memcache.dll ,但是当您在其他网站上描述了此操作的步骤时,他们并没有告诉您重命名,但是我有在我的项目中完成了此操作!).

unzip it and paste '.dll' file in the path xampp\php\ext, in my case it is F:\xampp\php\ext (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 >果冻糖

Download the Memcache.exe from jellycan

下载完成后,将 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 的路径.并双击该文件,安装了内存缓存,现在只需添加net start "memcached server"行,即可启用您的内存缓存.

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:\Windows\system32> net start memcached

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

The memcached service is starting. The memcached service was started successfully.

C:\Windows\system32> net stop memcached

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

The memcached service is stopping. The memcached service was stopped successfully.