Codeigniter2. Problems with 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: Codeigniter2. Problems with Memcached (/showthread.php?tid=40038) |
Codeigniter2. Problems with Memcached - El Forum - 03-28-2011 [eluser]zebric[/eluser] Hi all! Somehow, this does not work code: Code: $this->load->driver('cache'); As a result of an error: Fatal error: Call to a member function add () on a non-object in: system \ libraries \ Cache \ drivers \ Cache_memcached.php on line 67 In line 67 the method save: Code: public function save ($ id, $ data, $ ttl = 60) Add method somehow I do not see ...., maybe this problem? Codeigniter2. Problems with Memcached - El Forum - 03-28-2011 [eluser]InsiteFX[/eluser] _memcached is the memcache object! Check your apache httpd.conf file and make sure that it is loading the memcache module. Code: // remove the # sign if it is there to load the memcache module. InsiteFX Codeigniter2. Problems with Memcached - El Forum - 03-28-2011 [eluser]zebric[/eluser] This issue I decided as follows: in file Cache_memcached.php added constructor Code: function __construct() { Codeigniter2. Problems with Memcached - El Forum - 03-29-2011 [eluser]bunal[/eluser] The problem in the CI library is that it is looking for the apache module mod_memcached not the php extension in which most cases it is used. Cache_memcached.php Line 192 Code: if ( ! extension_loaded('memcached')) Which should be below, if loaded as extension Code: if(class_exists('Memcache')){ Line 156 Code: $this->_memcached = new Memcached(); Which should be below, if loaded as extension Code: $this->_memcached = new Memcache(); Codeigniter2. Problems with Memcached - El Forum - 03-29-2011 [eluser]zebric[/eluser] As they say Ukrainian "Thank you very much!" Codeigniter2. Problems with Memcached - El Forum - 03-29-2011 [eluser]bunal[/eluser] As they say Turkish "Your welcome" |