Procedure for configuring memcache in php in windows

Source: Internet
Author: User
This article provides a detailed analysis of how to configure memcache for php in windows. For more information, see

This article provides a detailed analysis of how to configure memcache for php in windows. For more information, see

First, install the php and apache environments.
I used a wamp integrated suite.
Php 5.2.8
Apache 2.2.1.1
After these are all ready,
Go to the memcache official website to download the memcache.exe program in windows.

Then put it in the c: \ memcache directory.
Open the cmd command and enter
Cd c: \ memcache

Install
Memcache.exe-p install

After installation is complete
Memcache.exe-p start

After memcache is enabled successfully

Put php_memcache.dll in the php/ext directory.

Add a piece of content to the php. ini file in the php Directory.
Extension = php_memcache.dll

After the installation, the U.S. server and Hong Kong server will restart apache.

Then output phpinfo () on the php page ();

Check whether memcache is successfully loaded.



If it is loaded successfully, the US space can be tested on a php page.

// Phpinfo ();

$ Memcache = new Memcache;
$ Memcache-> connect ('127. 0.0.1 ', 127) or die ('shit ');

$ Memcache-> set ('key', 'Hello memcache! ');

$ Out = $ memcache-> get ('key ');

Echo $ out;

If it succeeds, it will output

Hello memcache!

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.