How to install PHP's Memcache module under Windows _php tips

Source: Internet
Author: User
Tags install php memcached

Requirements Required Knowledge

Familiar with the BASIC programming environment setup.

Operating Environment

Windows 7 (64-bit);
php-5.3;
memcached-1.2.6

Download Address

Environment download

What is PHP memcache module

The Memcache module provides a convenient process-oriented and object-oriented interface for memcached, memcached a resident process caching product that results from loading data from a database for dynamic Web applications.

Download Memcache website PHP memcache Download Address

Also attached are 64-bit memcache for php5.3 download address http://www.jb51.net/softs/205839.html

Here you need to pay attention to the version number, according to personal circumstances, I am under the Php_memcache-3.0.8-5.3-ts-vc9-x86.zip

Use the Phpinfo () function to view information about the current PHP version

Install extension

Unzip the downloaded compression pack and copy the Php_memcache.dll module to the Ext folder in PHP.

modifying php.ini files

Introduce the following code

Test

Restart the Web server.

Enter the following code in the memcache.php file:

<?php
$memcache = new Memcache;
$memcache->connect (' 127.0.0.1 ', 11211);
$memcache->set (' key ', ' Hello memcache! ');
$out = $memcache->get (' key ');
echo $out;
? >

In the browser to test, here is the need to note that the Memcache service must be in the boot state Oh. For the installation of the Memcache service on the Windows platform, you can refer to an article I wrote before.

Install configuration Memcached in Win system

If the above article or link to you, do not forget to click on the end of the article "still good" button or to the lower right corner of the page click "Praise a" button oh. You can also click on the right side of the page to "share" the hover button Oh, let more people read this article.

Because of my limited level, the article in terms of presentation and code, if there are irregularities, welcome criticism. Leave your footprints, welcome to comment Oh.

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.