Mahdi Bashirpour
Mahdi Bashirpour

Reputation: 18803

Install Memcached on Windows

While doing some web development, I needed to have Memcached (source code) installed on my local machine to closely simulate what was going on my server.

How to install Memcached on Windows?

Upvotes: 26

Views: 56622

Answers (4)

Itra
Itra

Reputation: 198

  1. Download the archive according to the PHP version. This does not work with version higher than php 8.1.0. https://pecl.php.net/package/memcached/3.2.0/windows
  2. Move this files libmemcached.dll and libhashkit.dll to the C:\Windows .
  3. Move php_memcached.dll into the C:/php/ext.
  4. Edite php.ini file. Add extension=memcached to the php.ini.
  5. Enjoy!

Upvotes: 1

b126
b126

Reputation: 1254

As told in some previous comments the v1.4.4 is sometimes coming from a trusted source, sometimes not and it becomes hard to find. But there is now a very stable Windows native port for both 32 bits and 64 bits versions.

https://github.com/jefyt/memcached-windows

It's running well on our two PHP servers (PHP7 and PHP8). Hope this helps.

Another Cygwin version is also available here and runs well too https://github.com/nono303/memcached

Upvotes: 1

Mahdi Bashirpour
Mahdi Bashirpour

Reputation: 18803

Steps to install Memcached on Windows:

  1. Download a stable version, in either 32-bit or 64-bit I have tested the 64-bit version.
  2. Unzip it in some hard drive folder. For example C:\memcached
  3. There will be memcached.exe file in the unzipped folder.
  4. Open a command prompt (need to be opened as administrator).
  5. Run c:\memcached\memcached.exe -d install

For start and stop run following command line

c:\memcached\memcached.exe -d start
c:\memcached\memcached.exe -d stop

Upvotes: 34

Azmol
Azmol

Reputation: 477

I just ran the following off a youtube tutorial after @Bashirpurs step-by-step guide. Make sure to cd into the Memcached folder.

memcached -m 512(This is your memory allocation) -vvv

Upvotes: 2

Related Questions