Windows 7 x64 install memcache on Wampserver

Source: Internet
Author: User
Tags windows 7 x64 website performance


Windows 7 x64 has installed memcache on Wampserver for a holiday and reinstalled the system for Windows 7 x64. the development environment under windows I used has been upgraded to the latest version. The integrated version is php5.3.13, everything went well, but when installing php's memcache extension, it was found that the official did not provide (http://downloads.php.net/pierre/), only to provide limited x86 thread security and non-thread security, x64 is not provided. After a review, the installation is successful, and the record is made again to facilitate future search. Www.2cto.com
1. Install memcache php extension 1. php_memcache.dll download: php_memcache.zip http://up.2cto.com/2012/0713/20120713110240777.zip

2. put php_memcache.dll in the php ext directory, for example, D: \ WampServer \ bin \ php \ php5.3.11 \ ext \ php_memcache.dll3. open php. ini file: My php. ini location: D: \ WampServer \ bin \ php \ php5.3.11 \ php. ini4. in php. add a line to ini: extension = php_memcache.dll 5. restart the apache service of Wampserver so that the php memcache extension www.2cto.com is installed. 2. Install memcached 1. download Memcached-win64:. download the latest version: http://blog.couchbase.com/memcached-windows-64-bit-pre-release-available B. download: memcached-win64-1.4.4-14.zip
Http://up.2cto.com/2012/0713/20120713110308123.zip

2. decompress the package to a disk, for example, D: \ WampServer \ bin \ memcached \ memcached.exe 3. enter the following command on the terminal (that is, the cmd command interface) to install windows Services: D: \ WampServer \ bin \ memcached> memcached.exe-d install 4. run the following command to start: D: \ WampServer \ bin \ memcached> memcached.exe-d start. There are many parameters here. If you are interested, check the NOTE: in the future, memcached will be used as a windows service to automatically start every time it is started. In this way, the server has been installed. Www.2cto.com. In addition, many children's shoes cannot even distinguish between memcache and memcached, here, I can refer to my previous articles ################################ ############# differences between memcache and memcached, it is easy to understand that memcached is a memory cache, but how can we still have memcache? In fact, it is very simple, memcache is an extension of php, for php to manage memcached, php-memcache.dll. If memcached is installed and no extension is installed, php cannot control memcached, but the command line is correct. If memcache extension is installed but memcached service is not installed, therefore, you cannot use memcached to improve dynamic website performance in PHP only when memcached service and memcache extension are installed at the same time ######### #######################################
The test code is as follows: $ memcache = new Memcache; $ memcache-> connect ("localhost", 11211); echo "Server's version :". $ memcache-> getVersion (). "\ n"; $ tmp_object = new stdClass; $ tmp_object-> str_attr = "test"; $ tmp_object-> int_attr = 123; $ memcache-> set ("key ", $ tmp_object, false, 10); echo "Store data in the cache (data will expire in 10 seconds) \ n"; echo "Data from the cache: \ n "; var_dump ($ memcache-> get ("key"); www.2cto.com you can see the following results ---------- PhpUnit ---------- Server's version: 1.4.4-14-g9c660c0Store data in the cache (data will expire in 10 seconds) Data from the cache: object (stdClass) #3 (2) {["str_attr"] => string (4) "test" ["int_attr"] => int (123)} Output completed (2 sec consumed)-Normal Termination author zdrjlamp

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.