Install memcache under Windows 7

Source: Internet
Author: User
Tags memcached

Installation Environment: WINDOWS 7

1. Download the memcache Windows stable version, extract and put under a disk, such as in h:/wamp/www/php Api/memcache;

2. In the terminal (that is, the cmd command interface), enter the installation command:
h:/wamp/www/php api/memcache/memcached.exe–d Install
[Hint Error: Failed to install service or service already installed]
Workaround: Locate the Cmd.exe file in the system disk, right-click and run as Administrator

3. Enter the command and start the Memcache service
h:/wamp/www/php api/memcache>memcached.exe-d Start

4. Test whether the Memcache connection is successful
h:/wamp/www/php api/memcache>telnet 127.0.0.1 11211
[Hint error: ' Telnet ' is not an internal or external command, nor a running program or batch file. ]
Note: Windows7 with telnet, except that it is not installed by default.
Workaround:
Turn on "start" → "Control Panel" → "Programs and Features"--> "Turn on or off Windows features", at the open window, look for and check the Telnet client, then click OK. After the smooth installation, then enter this command on the run under the OK.

1. Start –> Control Panel –> programs and functions
2. Turn on or off the Windows feature on the left
3. Locate the Telnet client and select Install

5. Input: Stats command to view basic information.
Memcache connection Test run successfully!
6. Input: Quit exit


Configuration:

1. Download: Php_memcache.dll components. If you are using the WAMP5 integrated development environment, you can take the

2. Copy: Php_memcache.dll to the specified component directory, by default under php/ext/.

3. Add a word in php.ini: Extension=php_memcache.dll.

4. Restart the Web server and use the Phpinfo () function to view the enabled situation.


Test:

Create mem.php, the source code is as follows:

<?php

$mem = new Memcache; Instantiation of
$mem->connect (' 127.0.0.1 ', 11211) or Die ("link failed"); 127.0.0.1 (server address) 11211 (port number)
echo $mem->getversion (); Get version information, use echo output

?>

Related Article

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.