Memcached for PHP 5.3 Graphics Tutorial in Win system installation configuration

Source: Internet
Author: User
Tags crc32 hash memcached vc9 zip

How do I get PHP to support memcached on a Windows system?

First step: Install Memcached Service
Step two: Let php load memcached.dll extension

The following information for reference:
1. Installing Memcached for PHP 5.3 on Windows 7
2, Windows under the memcache installation configuration + did not successfully load memcached

Detailed steps are as follows:

First step: Install Memcached Service

1, download Memcached Win32 (point I download)

2, unzip the downloaded file to the custom directory, for example (c:webservermemcached)
After decompression, there is only one memcached.exe in the directory

3. Run command line with admin rights (CMD)

4, installation

The

code is as follows:


memcached-d Install

Tip: If you are prompted to MSVCP71.dll an error that does not exist, visit here (poke me)

5, start

The

code is as follows:


memcached-d Start

6, check the installation path (can not be ignored)

The

code is as follows:


WMIC Process get description, ExecutablePath | findstr Memcached.exe

Show:
Memcached.exe C:webservermemcachedmemcached.exe

Here, the memcached service is installed.

Step two: Let php load memcached.dll extension

1, download the VC9 version of the Memcached.dll
Thread safe version
Http://downloads.php.net/pierre/php_memcache-2.2.6-5.3-vc9-x86.zip
Non-threaded security version fastcgi how to run PHP
Http://downloads.php.net/pierre/php_memcache-2.2.6-5.3-nts-vc9-x86.zip

2, decompression get php_memcache.dll, and copy to PHP's extended directory C:webserverphp5.3ntsext

3, edit php.ini, add at its bottom

The

code is as follows:


[Memcache]


Extension=php_memcache.dll


a high-performance distributed memory object caching system that maintains a unified, huge hash table in memory,


It can be used to store data in a variety of formats, including images, videos, files, and the results of database retrieval.


whether to transparently failover to other servers when an error is encountered.


memcache.allow_failover = 0


the maximum number of servers to try when accepting and sending data, only when opening memcache.allow_failover.


memcache.max_failover_attempts = 20


data will be transferred according to the block size set by this value. The smaller the value, the more network traffic is required.


, you can try to increase this value to 32768 if you find that it is not interpreted at a reduced rate.


memcache.chunk_size = 8192


The default TCP port to use when connecting to the memcached server.


Memcache.default_port = 11211


Control the policy that maps the key to the server. The default value "Standard" represents the old hash policy using the previous version.


set to "consistent" allows you to add/Remove servers in a connection pool without having to recalculate the mapping relationship between key and server.


memcache.hash_strategy = "consistent"


controls the hash function that maps the key to the server. The default value "CRC32" uses the CRC32 algorithm, whereas "FNV" means the FNV-1A algorithm is used.


; The fnv-1a is slightly lower than the CRC32 speed, but the hash effect is better.


memcache.hash_function = "CRC32"


the following 2 settings see above [session]


is memcache when the mark uses Memcache as the session processor


Session.save_handler = "Files"


defines the separator symbol for each server link used for call storage, for example: "tcp://host1:11211, tcp://host2:11211"


each server link can contain parameters that are accepted to the server, comparing servers similar to those added using Memcache::addserver ()


For example: "tcp://host1:11211?persistent=1&weight=1&timeout=1& amp;retry_interval=15"


Session.save_path = ""

4, restart IIS (run on the command line)

The

code is as follows:


Iisreset/restart

At this point, the memcached configuration is complete

The above is the entire content of this article. I hope you can enjoy it.

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.