I have enabled authcache but I am still getting the message below:

Your settings.php file must be modified to enable Authcache ($conf['cache_inc']). See README.txt.

Here are the files in my settings.php file:

$conf['cache_inc'] = './sites/all/modules/cacherouter/cacherouter.inc';

$conf['cacherouter'] = array(
  'default' => array(
    'engine' => 'db',
    'servers' => array(),
    'shared' => TRUE,
    'prefix' => '',
    'path' => 'sites/default/files/filecache',
    'static' => FALSE,
    'fast_cache' => TRUE,
  ),
);

Comments

sammyman’s picture

Version: 6.x-6.x-dev » 6.x-1.0-rc2
sammyman’s picture

Another strange thing is that if I leave the engine on db, I get that same error, but if I try apc, memcache, or memcached, or even file I get an error like this:

Fatal error: Class 'Memcached' not found in /home/xxx/public_html/sites/all/modules/cacherouter/engines/memcached.php on line 203

Jonah Ellison’s picture

Category: bug » support

$conf['cache_inc'] needs to be set to authcache.inc, not cacherouter:

$conf['cache_inc'] = './sites/all/modules/authcache/authcache.inc';

Do you have the Memcache PHP extension installed? http://www.php.net/manual/en/memcache.installation.php

sammyman’s picture

I don't know if I have Memcache PHP extension installed. If it is would I change this line?

'engine' => 'db',

Is memcache the fastest? I have a VPS, but I don't know how to do that so I will contact the managers to see if they can get it installed for me. Is that why I am getting the error messages like

Fatal error: Class 'Memcached' not found in /home/xxx/public_html/sites/all/modules/cacherouter/engines/memcached.php on line 203

Jonah Ellison’s picture

APC and memcache are both fast, though you also have to setup a memcache server/daemon for memcache to work: http://www.lullabot.com/articles/installing-memcached-redhat-or-centos

Try creating a php file with phpinfo();
And search for APC and/or memcache to see if any of these engines are installed.

sammyman’s picture

I don't see any info for either APC or memcache. I guess I can install them and go from there. Thanks for the help.

sammyman’s picture

I have just installed memcache, but when I enabled it, it gave a weird error. Here are my settings:

$conf['cache_inc'] = './sites/all/modules/authcache/authcache.inc';

$conf['cacherouter'] = array(
  'default' => array(
    'engine' => 'memcache',
    'servers' => array(),
    'shared' => TRUE,
    'prefix' => '',
    'path' => 'sites/default/files/filecache',
    'static' => FALSE,
    'fast_cache' => FALSE,
  ),
);  

And the error:

Fatal error: Class 'Memcache' not found in /home/xxx/public_html/sites/all/modules/cacherouter/engines/memcache.php on line 199

sammyman’s picture

I got rid of the error, but I think authcache isn't working now. Here are my settings:

$conf['cache_inc'] = './sites/all/modules/authcache/authcache.inc';

$conf['cacherouter'] = array(
  'default' => array(
    'engine' => 'memcache',
    'server' => array('localhost:11211'),
    'shared' => TRUE,
    'prefix' => '',
    'static' => FALSE,
  ),
);

I also tried adding this line but it still doesn't work:

'path' => 'sites/default/files/filecache',

bryancasler’s picture

Subscribe, having the exact same problem. Anyone able to figure this out?

gausarts’s picture

I had this Fatal error: Class 'Memcache' not found error in my windows machine some time ago. The problem is extension php_memcache.dll is not installed yet in the php extension directory. No idea for LINUX, but I read it's because memcached is not compiled properly, try googling around, LINUX is not my bag.

Hope that helps

bryancasler’s picture

I'm on Rackspaces's CloudSites which is shared (ie unmanageable) hosting. I was also trying to use the DB engine as I can not install APC, eAccellerator, XCache or Memcache

sammyman’s picture

Anyone have insight on this. My site really needs memcache.

spacereactor’s picture

you should ask your host to install memcache or APC for you, since you using VPS shouldn't be a big problem.

bryancasler’s picture

I asked Rackspace's CloudSites tech support and they have no plan to install memcache or APC

spacereactor’s picture

than you have to use drupal engine, change it to

'engine' => 'db',
'servers' => array(),
'shared' => FALSE,

sammyman’s picture

I do have memcache installed on my VPS. These are my settings right now. Authcache is still not work on my site with memcache.

$conf['cache_inc'] = './sites/all/modules/authcache/authcache.inc';

$conf['cacherouter'] = array(
'default' => array(
'engine' => 'memcache',
'server' => array('localhost:11211'),
'shared' => TRUE, // memcached shared single process
'prefix' => '', // cache key prefix (for multiple sites)
'path' => 'sites/default/files/filecache', // file engine cache location
'static' => FALSE, // static array cache (advanced)
// 'fast_cache' => TRUE,
),
);

I just noticed that it appears my cache files are being saved to ''sites/default/files" and not "sites/default/files/filecache". Where do I change it so the above settings are correct and so the cache is being saved to the filecache folder?

Jonah Ellison’s picture

hi sammyman, if you comment out the $conf['cacherouter'] settings, does Authcache work? (Authcache falls back to database caching when no cache handler is found. Authcache should work then, if not, then the problem isn't memcache.)

Also, you may want to try using the Memcache API module.

bryancasler’s picture

I could really use some help on this. I just did a fresh install with AuthCache rc2 and cacherouter dev, so everything is up to date.

I added the following to my settings.php file

$conf['cache_inc'] = './sites/all/modules/authcache/authcache.inc';
$conf['cacherouter'] = array(
  'default' => array(
    'engine' => 'db',
    'servers' => array(),
    'shared' => FALSE,
    'prefix' => '',
    'path' => 'sites/default/files/filecache',
    'static' => FALSE,
    'fast_cache' => TRUE,
  ),
);

I am still receiving the error. "Your settings.php file must be modified to enable Authcache ($conf['cache_inc']). See README.txt."

Any idea what could be going on here?

bryancasler’s picture

Looks like I didn't have my permission right on my settings.php file, so my changes were never being saved. Now that I have that taken care of that, the error is gone and everything is getting cached.

How do you set how often the cache is flushed? Can pages be pre-cached on cron runs?

Jonah Ellison’s picture

hi animelion,

All cache invalidation is handled by Drupal core.

There isn't any support for pre-caching... though you could add a wget/curl command in your crontab to load a page to make sure it gets cached.

Anonymous’s picture

There's something wrong here,

I have this in settings.php:

$conf['cache_inc'] = './sites/all/modules/contrib/authcache/authcache.inc';

But the error still shows

"Your settings.php file must be modified to enable Authcache ($conf['cache_inc']). See README.txt."

You are checking like this:

substr(variable_get('cache_inc',false), -13)

I think there is a problem there. Because the cache does load anyway.

bryancasler’s picture

morningtime,

I had this problem as well, and I did not notice that the /contrib/ part in the file path. Once I removed that everything worked fine. Don't know if that helps any.

Jonah Ellison’s picture

hi morningtime,

Does Authcache debug work for you even when that warning message displays?

substr(variable_get('cache_inc',false), -13) means grab the last 13 characters, which is authcache.inc if configured correctly.

sammyman’s picture

I think my settings file wasn't being overwritten, so I changed it to 777 and now I think I have both memcache working with authcache and boost. This is a good step. (I also thought authcache wasn't working because I was logged in as Admin which never caches)....

Jonah Ellison’s picture

Status: Active » Closed (works as designed)
aze2010’s picture

subscribing with latest Dev and D6

fender177’s picture

try using memcached (d at the end) in your config...