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