Install memcached on Windows in 5 minutes (php5)

    Many developers use Memcached, a system for caching various objects in RAM. It is installed very simply
    :

    1. Go to www.splinedancer.com/memcached-win32 and download memcached itself in the form of binaries .
    At the moment, the latest version is 1.2.4.

    2. Unpack the archive on the local machine to any directory, for example, c: \ program files \ PHP5 \ memcached \

    3. In order for memcached to work as a service, you need to open the command line (cmd) and memcached from the directory where memcached is installed .exe -d install

    4. The start of the memcached service can be done automatically or manually. We go to Start-> Settings-> Control Panel-> Administrative Tools-> Services, look for the memcached server and start it if it is stopped.
    Memcached is ready, but you need an API to work with it for the language you are writing in.
    API list

    5. To work with memcached from PHP, download the PECL module for the required version of PHP from pecl4win.php.net

    6. Save the dll file to a directory with PHP extensions (I have c: \ program files \ PHP5 \ ext \)

    7 In the php.ini file, in the section with the extensions connected, add the line
    [PHP_MEMCACHED]
    extension = php_memcache.dll

    8. Check the installation through phpinfo (). A memcache block should appear with the directives memcache.allow_failover, memcache.chunk_size, memcache.default_port, memcache.hash_function, memcache.hash_strategy, memcache.max_failover_attempts.

    9. Memcached is ready to go! :)

    Also popular now: