Install Memcached extensions in PHPNOW-1.5.6

Source: Internet
Author: User
First, we need to download two files: memcached.exe and php_memcache.dll. here we need to note that the version does not match and it seems to have a problem. Download is provided below and tested to be compatible with the PHPNOW-1.5.6. Here I will compress it and provide direct download.

First, we need to download two files: memcached.exe and php_memcache.dll. here we need to note that the version does not match and it seems to have a problem. Download is provided below and tested to be compatible with the PHPNOW-1.5.6. Here I will compress and provideDirect download.

Installation steps:

 
 
  1. 1. decompress memcached.exe to any Directory. here, I decompress it to the PHPnow installation directory (E: \ Working \ PHPnow \ memcached.
  2. Run the following command in CMD:
  3. "E: \ Working \ PHPnow \ memcached \ memcached.exe-d install"
  4. Install as a system service.
  5. 2. run the following command in CMD:
  6. "E: \ Working \ PHPnow \ memcached \ memcached.exe-d start"
  7. Start the service.
  8. 3. decompress php_memcache.dll and copy it to the PHP extension directory (E: \ Working \ PHPnow \ php-5.2.14-Win32 \ ext)
  9. 4. add a line to the php-apache2handler.ini
  10. 'Extension = php_memcache.dll'
  11. 5. restart apache. if the restart succeeds, you can view the related information in phpinfo.

Basic settings of Memcached:

 
 
  1. -P listening port
  2. -L connected IP address. the default value is local
  3. -D start: start the memcached service.
  4. -D restart: restart the memcached service.
  5. -D stop | shutdown the running memcached service
  6. -D install the memcached service
  7. -D uninstall memcached service
  8. -U runs as the identity (only valid when running as root)
  9. -MB maximum memory usage, in MB. The default value is 64 MB.
  10. -An error is returned when M memory is used up, instead of deleting items.
  11. -C: maximum number of simultaneous connections. the default value is 1024.
  12. -F block size growth factor, default value: 1.25
  13. -N: Minimum allocation space. the default value of key + value + flags is 48.
  14. -H Show Help

Memcached environment test:

 
 
  1. // Tianya PHP blog http://blog.phpha.com
  2. $ Mem = new Memcache;
  3. $ Mem-> connect ("127.0.0.1", 11211 );
  4. $ Mem-> set ('key', 'www .phpha.com ', 0, 60 );
  5. $ Val = $ mem-> get ('key ');
  6. Echo $ val;
  7. ?>

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.