Set Up Memcached and Memcache for Windows 2008 and IIS

Set Up Memcached and Memcache for Windows 2008 and IIS

by Paul Lindgreen -
Number of replies: 4

I have been trying to install Memcache and Memcached. to use in the MUC. While installing the Memcached server I was only able to see the Memcache Store in the MUC, not the Memcached Store. The Memcache store also indicates the error 'This store doesn't meet the requirements for all known definitions...'

Here's how I tried to install memcached and the screenshot below is from my MUC:

1] Downloadmemcached. Use the win32 binary version. place in C:\memcached.
version 1.4.4-14 https://blog.couchbase.com/memcached-144-windows-32-bit-binary-now-available
2] install it as a service with NSSM, http://nssm.cc/usage
memcached.exe service is running in task manager
3] enable php extension. download dll here http://windows.php.net/downloads/pecl/releases/memcache/3.0.8/php_memcache-3.0.8-5.5-nts-vc11-x86.zip update php.ini with extension=php_memcache.dll , appears in phpinfo() now
4] memcache shows up in moodle MUC plugins as 'Ready' but not memcached, still something missing for memcached
http://ca2.php.net/manual/en/memcached.requirements.php '..This extension requires » libmemcached client library ..' http://docs.libmemcached.org/

I'm not sure how to install the memcached library dependency in Windows 2008/IIS? Can anyone else shed some light on how they got memcached to work on a Windows 2008/IIS server or even my memcache which?

=====================
My environment is Moodle 2.5.4 Windows 2008 server, IIS 7.5 , php 5.5, 14gb Memory, 4 cpu
Mysql1 on seperate server, same specs as above: Mysql server 5.1, windows 2008 64 bit
Zend Extension Build API220090626,NTS,VC9 PHP Extension Build API20090626,NTS,VC9 Thread Safety disabled System Windows NT MOODLE2TEST 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 Build Date Aug 15 2012 19:57:50 Compiler MSVC9 (Visual C++ 2008) Architecture x86:
=================

Average of ratings: Useful (1)
In reply to Paul Lindgreen

Re: Set Up Memcached and Memcache for Windows 2008 and IIS

by Paul Lindgreen -

http://ttcshelbyville.wordpress.com/2013/12/05/install-memcache-to-speed-up-php-on-iis/

The link above suggests adding the following lines to the config.php file, after adding this and resetting IIS Memcache appeared as an option in MUC but now when I go the Edit Mappings there's no option for Memcache or even MongoDB for Session caching (they are in Application caching options though).

$CFG->cachetype=’memcached’;
$CFG->rcache = true;
$CFG->memcachedhosts= ’localhost′;//i needed to enter local host instead of 127.0.0.1)
$CFG->memcachedpconn=true;

Average of ratings: Useful (1)
In reply to Paul Lindgreen

Re: Set Up Memcached and Memcache for Windows 2008 and IIS

by Paul Lindgreen -

The libmemcached download has the following 'readme.win32 file copntents:
===============
Hi,

So you want to know how to build libmemcached on Windows? In order to have a single build environment you need to install mingw to get a "unix environment" to run the configure script.

An easy way to get started is to install the msysgit fullinstall package from: http://code.google.com/p/msysgit/downloads/list

msysgit does not contain the "autotools" needed to generate a configure script, so you need to generate that on another box (this should not be a problem if you're trying to build from a tar archive).

msysgit does not contain the tools to build the documentation, so you need to add --without-docs to configure.

I'm normally building libmemcached with:

Ex: $ ./configure --without-docs --with-memcached=../memcached/memcached.exe $ make all install

Happy hacking,

Trond Norbye
================

So it looks like 'mingw' is required to get the library installed. This is turning into a convoluted process, does anyone know an easier way to get memcache and memcachwed working on windows?

Average of ratings: Useful (1)
In reply to Paul Lindgreen

Re: Set Up Memcached and Memcache for Windows 2008 and IIS

by Paul Lindgreen -

http://bestlovejava.blogspot.ca/2013/07/about-libmemcached-under-windows-of.html

 

Tried following the instructions on using  mingw but I lack git/unnix experience to type in the following simple line of code correctly: $. / configure - without-docs - with-memcached =.. / memcached / memcached.exe

My memcached is located here: C:\memcached\memcached.exe and git is located here C:\Program Files (x86)\Git\bin\sh.exe , I'm guessing my path above needs to be updated.....this projects keeps getting deeper and deeper over my head.....

In reply to Paul Lindgreen

Re: Set Up Memcached and Memcache for Windows 2008 and IIS

by Alok Garg -

I am still facing the same issue. Memcached Plugin - still showing as "Invalid Plugin". Please help how to resolve this issue.