How to install Memcache in the Windows system IIS Environment

Source: Internet
Author: User
Tags configuration php

1, first download memcached-1.2.1-win32.zip

http://download.csdn.net/detail/u011986449/8110579

This is the version under Windows, the installation to be installed under the command line
Decompression Room C or other disk can be, such as my is the C disk memcache121 directory, and then into the cmd command line, as follows:

Microsoft Windows [version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\Documents andsettings\administrator>cd\

C:\>CD memcached121

C:\memcached121>memcached.exe-dinstall (Install as service)

C:\memcached121>memcached.exe-dstart (Start)

C:\memcached121>
This allows you to see the memcache.exe process inside the process. This will automatically start every time you start

2. Download the PHP version corresponding to the Php_memcache.dll (my PHP version is php-5.2.9-1-win32.zip)
Download Pecl-5.2.6-win32.zip here at Http://cn.php.net/get/pecl-5.2.6-Win32.zip/from/a/mirror
Then unzip, copy the inside of the Php_memcache.dll to your PHP ext directory, as mine is
D:\php5\ext directory, load Php_memcache.dll for PHP

3, Configuration PHP.ini
Add a line to the C:\windows\php.ini in the Extension=php_memcache.dll, (the location is

Extension=php_mbstring.dll These extensions can be added below the location)

4. Restart IIS, and then look at the phpinfo, if there is memcache, then the installation is successful!

Basic Settings for memcached:

-P Listening Port
-L connected IP address, default is native
-D Start memcached service
-D Restart Restart memcached service
-D Stop|shutdown Close the running memcached service
-D Install memcached service
-d Uninstall Uninstall memcached service
-U Run as (only valid when running as root)
-m maximum memory usage, in megabytes. Default 64MB
-M running out of memory and returning an error instead of deleting an item
-c Maximum number of simultaneous connections, default is 1024
-F Block size growth factor, default is 1.25
-N Minimum allocated space, key+value+flags default is 48
-H Display Help

memcache Environmental Testing :
Run the following PHP file, if there is output this is a test!, it indicates that the environment was built successfully. Begin to appreciate the charm of memcache!

< Php$mem = new Memcache; $mem->connect ("127.0.0.1″, 11211); $mem->set (' key ', ' This is a test! ', 0); $val = $me M->get (' key '); Echo $val; >



How to install Memcache in the Windows system IIS Environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.