Bravo List
Go Back   > Bravo List > P2P > Forum > Tutorials
Old 22nd March 2012, 16:42
DAKz's Avatar
DAKz DAKz is offline
Black Cobra Hosting
Join Date: Jul 2009
Posts: 380
Exclamation Installing Memcached on Windows 7 and Xampp
1a. Go to your php.ini file usually located in C:/xampp/php/php.ini
find this line:

replace with

1b. If you cannot find this line simply add the following line to below where all the ;extension= lines.

2. Add the following to just below the new line

  1. [Memcache]
  2. memcache.allow_failover = 1
  3. memcache.max_failover_attempts=20
  4. memcache.chunk_size =8192
  5. memcache.default_port = 11211
3. Download the necessary php_memecache.dll file from the following location.



For windows 7 I used the following file:

4. Unzip the php_memcache.dll file and put it into your php ext folder. Usually C:/xampp/php/ext/

5. Download memcached for windows here (make sure it’s the win32 binary):

6. Unzip and put the memcache.exe file into a desired directory (e.g. c:/memcached/)
7. Open command line in Windows Administrator Mode.
Click start, type in ‘Search programs and Files’ box, wait for the program cmd.exe to appear, right hand click on the icon and select run as administrator
8. Install the memcache service
Type the following into the command line

c:\memcached\memcached.exe -d install
If you dont get any errors it means it’s worked.
9. Start memcached
Type the following into the command line

  1. c:\memcached\memcached.exe -d start, or net start “memcached Server”
10. Restart Xampp Apache
11. Test Memcache
Create a php file and paste the following code. Then go to the page. If you do not see any errors then it has worked.

PHP Code:
= new Memcache;
$memcache->connect('localhost'11211) or die ("Could not connect");
$version $memcache->getVersion();
"Server's version: ".$version."<br/>\n";
$tmp_object = new stdClass;
$tmp_object->str_attr 'test';
$tmp_object->int_attr 123;
$memcache->set('key'$tmp_objectfalse10) or  die ("Failed to save data at the server");
"Store data in the cache (data will expire in 10 seconds) <br/>\n";
$get_result $memcache->get('key');
"Data from the cache:<br/>\n";
12. Just in case it doesn’t work: One other thing I did was to run the C:/memcached/memcached.exe file as administrator. This opens the ports on the windows firewall which might solve some problems.

You can verify if memcached is running by executing this in the command line:

wmic process get description, executablepath | findstr memcached.exe
  1. You should see a result list showing memcached.exe and its full path.

Easiest way to tell if memache is running... Check task manager services tab, if its runing it will be listed, if its not, well....then it's not.

Click the image to open in full size.

I have included both files here to save so time and headaches

Attached Files
File Type: zip (36.0 KB, 127 views)
File Type: zip (44.3 KB, 94 views)

Last edited by DAKz; 22nd March 2012 at 17:19.
Reply With Quote
The Following User Says Thank You to DAKz For This Useful Post:
parallaxz71 (1st December 2012)
Old 15th October 2012, 14:07
Typon's Avatar
Typon Typon is offline
Senior Member
Join Date: Aug 2012
Posts: 16
I'll try this, and give feedback in a minute!
Reply With Quote
Old 14th December 2012, 21:53
TJO's Avatar
TJO TJO is offline
Join Date: Mar 2010
Posts: 6
I have a windows server 2008 and in the command prompt i get an error when trying to install, "Missing MSVCR71.dll"
Fix that problem above but when i restarted xampp it showed a message that memcache couln't start becuse of configuration error but it did appaear in the task manager.

Last edited by TJO; 14th December 2012 at 22:11.
Reply With Quote
Old 5th April 2013, 17:22
Chez's Avatar
Chez Chez is offline
Senior Member
Join Date: Sep 2011
Posts: 278
I've got this error "Missing MSVCR71.dll", but i'm using Windows Xp. How i can solve this problem?
Reply With Quote
Old 5th April 2013, 17:25
DND's Avatar
DND DND is offline
Join Date: Dec 2008
Posts: 1,144
look for the file on google, download it, and put it in system32 folder from windows directory
and be aware to install memcache module for the proper php version instalation
just pm me if u have any problems with this
Reply With Quote

installing , memcached , windows , xampp

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 10:36. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2021, vBulletin Solutions Inc.