Go to your xampp install directory ->apache/bin, there you should have php.ini file
find this line:

Code:
;extension=php_memcache.dll
and replace it with:

Code:
extension=php_memcache.dll
now download memcached-1.2.6.tar.gz from here

Code:

http://code.jellycan.com/memcached/

Now you have to install memcache as a standalone service:

a)Unzip and copy the binaries to your desired directory (eg. c:\memcached) [you should see: memcached.exe and msvcr71.dll] b)Install the service using the command: c:\memcached\memcached.exe -d install from the command line
c)Start the server from the Microsoft Management Console or by running one of the following commands: c:\memcached\memcached.exe -d start, or net start “memcached Server”

3.Now you have to test it to see if everything’s allright:
memo.php

Code:
connect(“localhost”,11211);

echo “Server’s version: ” . $memcache->getVersion() . ”
\n”;

$tmp_object = new stdClass;
$tmp_object->str_attr = “test”;
$tmp_object->int_attr = 123;

$memcache->set(“key”,$tmp_object,false,10);
echo “Store data in the cache (data will expire in 10 seconds)
\n”;

echo “Data from the cache:
\n”;
var_dump($memcache->get(“key”));

?>
thats all

Post By Editor (2,827 Posts)

Website: →

Connect