1

I am trying to use the memcached for my large database queries. So far, I have installed the memcached services and it is running fine. Another thing which I am unable to find is php_memcached.dll file for windows 7, 64 bit. There are few but they talk about php_memcache.dll. I have installed that one and I can see in the Wamp->PHP->PHP extentions that the extension is running. Finally, I have created the memcached.php file in the application/config/ directory and put the following code:

<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

$config = array(
    'default' => array(
        'host'      => 'localhost',
        'port'      => 11211,
        'weight'    => 1
    )
);
?>

Whenever I se phpinfo(); I am unable to locate that memcached is configured. I do not know where I am going wrong. I reckon this is because I have installed memcached service and php_memcache.dll extension. Is this could be the reason ??

Or what could be potentially reason that it is not working on codeigniter.?

RK.
  • 973
  • 5
  • 19
  • 45
  • You might find all the info needed in here: http://stackoverflow.com/questions/3016656/how-to-enable-memcache-in-wamp Seems that it requires some step to install it on 64 bit windows 7. – tix3 Jan 10 '15 at 15:28

1 Answers1

0

codeigniter is trying to load the php memcached extension which is most likely not the one that comes with your windows installation. You will need to modify cached_memcached.php file located in the libraries folder.

and find this line

$this->memcached = new Memcached();

replace it with

 $this->memcached = new Memcache();

you can also choose to install the php memcached extension through pecl

sola
  • 149
  • 1
  • 2
  • 12