You are here: cakephp » fatal error class memcache not found cakephp
Fatal error: Class 'Memcache' not found - cakephp
- Written By
- PHPin24
- Submitted At
- 2009-07-22 13:42:15
- Num Views
- 1980
- Category
- CakePHP
|
To test if it's working on your server / not. Run the following: php -i | grep memcache You should see # php -i | grep memcache PHP Warning: PHP Startup: memcache: Unable to initialize module Module compiled with module API=20060613, debug=0, thread-safety=0 PHP compiled with module API=20050922, debug=0, thread-safety=0 These options need to match in Unknown on line 0 /etc/php.d/memcache.ini, The versions are different to the ones that is compatible First install libevent (remove first if exists) yum install libevent Second install memcached (remove first if exists) yum install memcached Uncomment the extension inclusion in memcache.ini (on red hat it's in the following folder) vi /etc/php.d/memcache.ini Now your memcache.ini should look like this ; Enable mbstring extension module extension=memcache.so Restart Apache and that should be it /etc/init.d/httpd restart -- IF THAT STILL DOES NOT WORK -- You can just comment out the following in the file app/app_controller.php to disable memcache //memcache connection $memcache = new Memcache; $memcache->connect('localhost', 11211) or die ("Could not connect"); $tmp_object = new stdClass; // temporary storage for memcache object if ($memcache) { $this->_memcache = $memcache; $this->_tmp_object = new stdClass; // temporary storage for memcache object } By PHPin24 @ 2009-07-22 13:42:15
|
