


Detailed explanation of how to install memcache and memcached server in IIS environment under Win2008 R2 64Bit
This article mainly introduces the IIS environment under Win2008 R2 64Bit Installation memcache and memcached server-side methods, friends in need can refer to the following
If you need memcache's caching support in an IIS+PHP environment. You need to install the server and client!
1. Install the memcached server
1. First download the memcached server. The download address below includes 32-bit and 64-bit versions. You can refer to your own System to download:
This is the version under windows. The installation must be installed under the command line.
You can unzip it to the C drive or other drives. For example, mine is the D drive memcached directory, and then enter cmd command line, as follows:
Microsoft Windows [版本 5.2.3790] (C) 版权所有 1985-2003 Microsoft Corp. C:\Documents and Settings\Administrator>d: D:\>cd memcache144 D:\memcached144>memcached.exe -d install (安装为服务) D:\memcached144>memcached.exe -d start (启动) C:\memcached44>
In this way, you can see the memcache.exe process in the process. In this way, it will start automatically every time it starts.
Memcached and some other commonly used commands are as follows:
The code is as follows:
-p 监听的端口 -l 连接的IP地址, 默认是本机 -d start 启动memcached服务 -d restart 重起memcached服务 -d s top |shutdown 关闭正在运行的memcached服务 -d install 安装memcached服务 -d uninstall 卸载memcached服务 -u 以的身份运行 (仅在以root运行的时候有效) -m 最大内存使用,单位MB。默认64MB -M 内存耗尽时返回错误,而不是 删除 项 -c 最大同时连接数,默认是1024 -f 块大小增长因子,默认是1.25 -n 最小分配空间, key +value+flags默认是48 -h 显示帮助
After installing according to the above installation steps, use After using memcached -m 200 to adjust the maximum memory usage, you will find that it does not work. The default memory is always 64MB. After searching on the Internet, the reason is that there is no information written in the registry, which can be modified in this way.
1. memcached -d shutdown First shut down the memcached service.
2. Enter the registry and find
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\memcached Server
. There is an ImagePath entry with the value "d:\memcached144\memcached.exe" -d runservice, followed by
-p 11211 -l 127.0.0.1 -m 256 -c 2048
2. Install the memcache client
2. Download the php_memcache corresponding to the php version.dll (the one I use here The php version is: php-5.4.15-nts-Win32-VC9-x86.zip)
Then unzip it and copy the php_memcache.dll inside to your php ext directory, for example, mine is
"d:\php\ext" directory, load php_memcache.dll for php
3, configure php.ini
in PHP's configuration In file : Add the following code to the bottom of php.ini:
[memcache] extension = php_memcache.dll
4. Restart IIS, and then check phpinfo. If there is memcache, it means the installation is successful. !
Test:
<?php $mem = new Memcache; $mem->connect("127.0.0.1", 11211); $mem->set('key', 'This is a test!', 0, 60); $val = $mem->get('key'); echo $val; ?>
The above is the detailed content of Detailed explanation of how to install memcache and memcached server in IIS environment under Win2008 R2 64Bit. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



In web development, we often need to use caching technology to improve website performance and response speed. Memcache is a popular caching technology that can cache any data type and supports high concurrency and high availability. This article will introduce how to use Memcache in PHP development and provide specific code examples. 1. Install Memcache To use Memcache, we first need to install the Memcache extension on the server. In CentOS operating system, you can use the following command

With the development of the Internet, PHP applications have become more and more common in the field of Internet applications. However, high concurrent access by PHP applications can lead to high CPU usage on the server, thus affecting the performance of the application. In order to optimize the performance of PHP applications, Memcached caching technology has become a good choice. This article will introduce how to use Memcached caching technology to optimize the CPU usage of PHP applications. Introduction to Memcached caching technology Memcached is a

In PHP development, using the Memcache caching system can greatly improve the efficiency of data reading and writing. Memcache is a memory-based caching system that can cache data in memory to avoid frequent reading and writing of the database. This article will introduce how to use Memcache in PHP for efficient data reading and writing operations, and provide specific code examples. 1. Install and configure Memcache First, you need to install the Memcache extension on the server. able to pass

How to use Memcache for efficient data writing and querying in PHP development? With the continuous development of Internet applications, the requirements for system performance are getting higher and higher. In PHP development, in order to improve system performance and response speed, we often use various caching technologies. One of the commonly used caching technologies is Memcache. Memcache is a high-performance distributed memory object caching system that can be used to cache database query results, page fragments, session data, etc. By storing data in memory

As web applications become increasingly complex, performance has become a critical issue. In many applications, database queries are one of the most time-consuming operations. In order to avoid frequently reading data from the database, a caching system can be used to store frequently read data in memory for quick access. In PHP development, using Memcached for distributed caching is an extremely common practice. In this article we will introduce how to use Memcached for distributed caching. What is Memca

How to use Memcache to optimize data storage operations in your PHP application? In web application development, data storage is a crucial link. In PHP applications, Memcache, as a memory cache system, can effectively improve the efficiency of data storage and reading operations. This article will introduce how to use Memcache to optimize data storage operations in PHP applications, and attach specific code examples. Step 1: Install the Memcache extension First, you need to install Me in your PHP environment

PHP is a very popular programming language commonly used for server-side web application development. As the user scale of web applications continues to grow and the amount of data continues to increase, efficient data caching and sorting operations become more and more important. Memcache is a very useful tool in this situation. This article will introduce how to use Memcache to achieve efficient data caching and sorting operations in PHP development, and provide specific code examples. What is Memcache? Memcache is

With the development of the Internet, caching technology plays an increasingly important role in Web development. Redis and Memcached, two popular cache servers, are widely used in various web application development. However, for developers who are not familiar with Linux systems, installing and configuring these cache servers can cause some trouble. However, with the help of Pagoda Panel, this process will become quite simple. 1. What is a pagoda panel? Pagoda panel is a Linux server management panel that can
