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
?>