Mar
1
2016

How to install Memcache on Xampp on Windows 7

Memcached is a general-purpose distributed memory caching system. It is often used to speed up dynamic database-driven websites by caching data and objects in RAM to reduce the number of times an external data source .

Memcached is free and open-source software, licensed under the Revised BSD license. Memcached runs on Unix-like operating systems (at least Linux and OS X) and on Microsoft Windows. It depends on the libevent library.

How to Install the Memcache on Xampp on Windows 7

Installing Memcache on Xampp and Windows 7

Step 1 Go to your php.ini file usually located in C:/xampp/php/php.ini find this line:
and replace it with:
If you cannot find this line simply add the following line to below where all the ;extension= lines.
Step 2 Add the following to just below the new line
Step 3 Download the necessary php_memecache.dll file from the following location.
For windows 7 I used the following file:
 

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

Step 5Download memcached for windows here (make sure it’s thewin32 binary):
 

Step 6 Unzip and put the memcache.exe file into a desired directory .(e.g. c:/memcached/)

Step 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.

Step 8 Install the memcache service Type the following into the command line.
 

If you dont get any errors it means it’s worked.

Step 9  Start memcached Type the following into the command line.
 

Step 10Restart Xampp Apache.

Step 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.
I hope you understand very well How to install Memcache on Xampp on Windows 7.

If you have any query regarding our tutorial How to install Memcache on Xampp on Windows 7 then you can comment.

 

About the Author: Sanjeev Kumar

Experienced PHP Web Developer and founder of www.codemarts.com. Expert in Codeigniter (MVC), WordPress, JSON, jQuery & HTML5.

Leave a comment