Install memcache related configuration under Window

Source: Internet
Author: User

In fact, it takes only two steps to install it:
First step: Install the Memcached.exe service.
Step Two: Install the php_memcache.dll extension and let PHP support Memcache.

1: Install the Memcached.exe service

Download Memcached.exe
: Http://www.hlmblog.com/dload/memcached-1.2.6-win32-bin.zip
After extracting it, put it in the directory you want to put it in.
Run:

Related parameters of memcache operation
-P Listening Port
-L connected IP address, default is native
-D Start memcached service
-D Restart Restart memcached service
-D Stop|shutdown Close the running memcached service
-D Install memcached service
-d Uninstall Uninstall memcached service
-U Run as (only valid when running as root)
-m maximum memory usage, in megabytes. Default 64MB (set Memcache size)
-M running out of memory and returning an error instead of deleting an item
-c Maximum number of simultaneous connections, default is 1024
-F Block size growth factor, default is 1.25
-N Minimum allocated space, key+value+flags default is 48
-H Display Help

If there are no errors as shown in the figure above, it is the Memcache.exe service installation OK.

2: Install the Php_memcache.dll extension

Download Php_memcache.dll, download the version must be suitable for your own PHP version,:
Http://www.hlmblog.com/dload/php_memcache.dll_.rar

There is a php_memcache.dll file for php5.2*,php5.3*,php5.4*, put Php_memcache.dll in the Ext folder of PHP, Open php.ini, find the keyword extension, you can see a lot of PHP extension, and then add Extension=php_memcache.dll this line of code, restart Wamp server, extension installation is complete.

3: Testing and validation

1
2
3
4
5
6
$mem=NewMemcache;
$mem-Connect("LocalHost",11211)  
$mem -> set ( ' key ' , ' I am memcache stored data ' ,0,60 ;   
$val = $mem -> get ( ' key ' ) ;  
echo $val //output as "I am memcache stored data", indicating that Windows local Memcache has been successfully installed!!

Install memcache-related configuration under Window

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.