Step one: Installation preparation: File download link ======》 http://www.zixue.it/thread-18806-1-1.html
Among these files: memcached.exe, libgcc_s_sjlj -1.dll, pthreadGC2.dll are used for installation, and php_memcache.dll is the extension required for installation (here I am posting the extension corresponding to the php5.4 version. If you use other versions of php, you can go to Baidu Find downloads or find resources on csdn)
Step 2: Put memcached.exe, libgcc_s_sjlj-1.dll, pthreadGC2.dll in a folder. The name of the folder can be in English. I use memcached here . Put this folder on your disk. There is no requirement on where to put it. Here I will just put it on the D drive.
Step 3: Open the cmd command line interface, enter the command d:Press Enter====》Enter the D drive
Enter the command cd memcachedPress Enter====》Enter the memcached directory
Enter the command memcached -d install Press Enter====》If there is no error here, it means the installation is successful
Enter the command memcached -d startPress Enter====》Start the memcached process. At this time You can see the memcached daemon in the task manager
Step 4: Place php_memcache.dll in the ext directory under the php directory, and open your php.ini file (if you find it difficult to find, use Windows directly Just search in the resource manager)
Step 5: ctrl+f to search for the keyword extension=Find your php extensions, add extension=php_memcache.dll among them, be careful not to add a semicolon
Restart the Apache service, create a test php file in your domain name directory, write to test
Open this php file in the browser, if you can find memcache The extension indicates that the installation was successful.
Write some more code to test whether memcache is supported:
<?php //date_default_timezone_set('PRC'); //phpinfo(); $memcache = new memcache(); $memcache->connect('127.0.0.1', 11211); $memcache->set('mydomain', 'hehe.com'); echo $memcache->get('mydomain'); ?>
Copyright statement: This article is an original article by the blogger and has not been authorized Reprinting is not allowed with the permission of the blogger.
The above introduces the method of installing the memcache extension on win7 64-bit, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.