CodeIgniter Forums
CI 2.1.4 and Memcached - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: CI 2.1.4 and Memcached (/showthread.php?tid=59639)



CI 2.1.4 and Memcached - El Forum - 10-29-2013

[eluser]Unknown[/eluser]
I'm new to CI and this is my first post. I'm trying to make use of memcache and I'm having a difficult time.

My environment is CentOS using PHP 5.4.16 and Apache 2.2.24. I have memcached running on the standard port. I have mem_cache_module installed in apache, and PHP sees memcache libraries on phpinfo.

When I run the following:
Code:
public function cache() {
  $this->load->driver('cache');
  $this->cache->memcached->save('foo', 'bar', 10);  
  var_dump($this->cache->memcached->is_supported());

}

I get:
Code:
bool(false)

This is in the log:
Code:
ERROR - 2013-10-26 23:04:55 --> The Memcached Extension must be loaded to use Memcached Cache.



CI 2.1.4 and Memcached - El Forum - 10-29-2013

[eluser]dickfu[/eluser]
memcache & memcached are two different extensions to php. what you loaded in php is named 'memcache', and what ci needed is called 'memcached'


CI 2.1.4 and Memcached - El Forum - 10-30-2013

[eluser]Unknown[/eluser]
As it turns out on CentOS 6 and PHP 5.4 php-pecl-memcached is not an easily obtainable RPM. The php-pecl-memcache (note without the d) claims it supports memcached but through some testing outside of CI it turns out it doesn't.

I've decided to stop chasing this rabbit and use APC instead.


CI 2.1.4 and Memcached - El Forum - 11-07-2013

[eluser]DuyK-DCT[/eluser]
Dont forget to create memcached.php in /config folder when you use memcached in codeigniter
(For more detail you can read in http://ellislab.com/forums/viewthread/180005/#852413)

And you should care that memcache and memcached is difference