Install memCache in win7 (procedure)

Source: Internet
Author: User
This article provides a detailed analysis of the memCache installation process in win7. For more information, see

1. download the memcache stable version for windows and decompress it to a disk, for example, H:/wamp/www/php api/memcache;

2. on the terminal (that is, the cmd command interface), enter the installation command:
H:/wamp/www/php api/memcache/memcached.exe-d install
[Error message: failed to install service or service already installed]
Solution: Find the cmd.exe file on the system disk, right-click it, and run it as an administrator.

3. enter the command to 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
[Error message: 'telnet 'is not an internal or external command, or a program or batch file that can be run.]
Note: Windows 7 has telnet, but it is not installed by default.
Solution:
Open "start"> "control panel"> "enable or disable Windows", find and check "Telnet client" in the window that opens, and then click "OK ". After the installation is successful, enter the command at run and then click OK.
1. Start-> Control Panel-> programs and functions
2. enable or disable windows on the left
3. find the Telnet client and select install

5. enter the stats command to view the basic information.
The memcache connection test is successful!

6. input: quit to exit
Configuration:
1. download the php_memcache.dll component. // If the wamp5 integrated development environment is used
2. Copy: php_memcache.dll to the specified component directory, which is under php/ext/by default.
3. add a sentence in php. ini: extension = php_memcache.dll.
4. restart the WEB server and use the phpinfo () function to view the Enabled status.
Test:
Create mem. php. the source code is as follows:
The code is as follows:
$ Mem = new memcache; // instantiate
$ Mem-> connect ('127. 0.0.1 ', 127) or die ("link failed"); // 127.0.0.1 (server address) 11211 (port number)
Echo $ mem-> getVersion (); // Obtain the version information and use echo to 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.