How to install memcache in windows IIS

Source: Internet
Author: User

How to install memcache in windows IIS
Download memcached-1.2.1-win32.zip

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

This is a windows version. You must install it in the command line.
You can decompress the C or other disks in the room. For example, if my c disk is the memcache121 directory, enter the cmd command line, as shown below:

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 (installed as a service)

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

C: \ memcached121>
In this example, you can see the memcache.exe process in the process. In this way, it will be automatically started at each start.

2.download php_memcache.dll(my php?is php-5.2.9-1-win32.zip)
In
Decompress the package and copy php_memcache.dll to your php ext directory.
D: \ php5 \ ext directory. Load php_memcache.dll for php.

3. Configure php. ini
Add a line of extension = php_memcache.dll to C: \ windows \ php. ini.

Extension = php_mbstring.dll. You can add the following extension locations)

4. Restart IIS and check phpinfo. If memcache exists, the installation is successful!

Basic settings of memcached:

-P listening port
-L connected IP address. The default value is local
-D start: start the memcached service.
-D restart: restart the memcached service.
-D stop | shutdown the running memcached Service
-D install the memcached Service
-D uninstall memcached Service
-U runs as the identity (only valid when running as root)
-MB maximum memory usage, in MB. The default value is 64 MB.
-An error is returned when M memory is used up, instead of deleting items.
-C: Maximum number of simultaneous connections. The default value is 1024.
-F block size growth factor, default value: 1.25
-N: minimum allocation space. The default value of key + value + flags is 48.
-H Show Help

Test the Memcache Environment:
Run the following PHP file. If This is a test! is output !, Indicates that the environment is successfully set up. Start 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, 60);$val = $mem->get(’key’);echo $val;?>

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.