📜 ⬆️ ⬇️

Installing memcached under 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 as binaries .
At the moment, the latest version is 1.2.4.

2. Unpack the archive on the local machine in 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) from the directory where memcached is installed and set memcached.exe -d install

4. Starting memcached service can be made automatic or manual. Go to Start-> Settings-> Control Panel-> Administration-> Services, look for the memcached server, and start it if it is stopped.
Memcached is ready, but to work with it you need an API for the language in which you are writing.
API list

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

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

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

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

9. Memcached is ready to go! :)

Source: https://habr.com/ru/post/25296/


All Articles