Memcache installation under Windows

Source: Internet
Author: User

Many phper do not know how to build memcache under Windows Development Debugging environment, recently, individuals are also studying memcache, recording their own installation of the process.
In fact, I began to study memcache did not know incredibly still have memcached for Win32 this bird thing, harm I cnetos under the 1 days to fix, today suddenly found under Windows Memcache to develop debugging completely no problem, So write a memcache document to share with everyone.

memcache installation under Windows :
1. Download Memcache's Windows stable version and unzip it under a disk, for example, in c:\memcached
2. Enter the ' c:\memcached\memcached.exe-d install ' installation in the terminal (also known as the cmd Command interface)
3. Re-enter: ' c:\memcached\memcached.exe-d start ' starts. Note: memcached will start automatically every time a service is turned on for Windows. This way the server side is already installed.
4. Download Php_memcache.dll, please find the corresponding PHP version of the file yourself
5. Add a line of ' Extension=php_memcache.dll ' to C:\winnt\php.ini
6. Restart Apache, then check the phpinfo, if there is memcache, then the installation is successful!

basic settings for memcached :

-
p Listening Port-l <ip_addr> connected IP address, default is native-D-Start memcached service-D Restart Restart memcached service-D Stop|shutdown close running me Mcached Service-D install memcached service-D Uninstall uninstall memcached service-U Run as identity (only valid when running as root)-m maximum memory usage, in megabytes. The default 64mb-m memory is exhausted when the error is returned, instead of deleting the item-C maximum number of simultaneous connections, the default is the 1024-F block size growth factor, default is 1.25-n minimum allocation space, key+value+flags default is 48-h display Help

memcache Environmental Testing :
Run the following PHP file, if there is output this is a test!, it indicates that the environment was built successfully. Begin to appreciate the charm of memcache!
< PHP
$mem = new Memcache;
$mem->connect ("127.0.0.1", 11211);
$mem->set (' key ', ' This is a test! ', 0, 60);
$val = $mem->get (' key ');
Echo $val;
?>

References :
Friends who have questions about memcached can refer to the following articles:
Memcache installation under Linux: http://www.ccvita.com/257.html
Memcache installation under Windows: http://www.ccvita.com/258.html
Memcache Basic Tutorial: http://www.ccvita.com/259.html
Discuz! 's memcache cache implementation: http://www.ccvita.com/261.html
Memcache Agreement Chinese version: http://www.ccvita.com/306.html
Memcache Distributed Deployment scenario: http://www.ccvita.com/395.html

Memcache installation under Windows

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.