I tried installing FileCache on local machine (WAMP stack) but the install instruction is not very clear to me (maybe for my ignorance again).

After installing the module, I pasted this lines into the settings.php file ($conf['cache_backends'] = array('sites/all/modules/filecache/filecache.inc'); $conf['cache_default_class'] = 'DrupalFileCache';) and saved after clearing cache. When I viewed I got this error message:

( ! ) Fatal error: require_once() [function.require]: Failed opening required 'C:\wamp\www\bellsauce/sites/all/modules/filecache/filecache.inc' (include_path='.;C:\php\pear') in C:\wamp\www\bellsauce\includes\bootstrap.inc on line 2297

A friend on this forum (Simg) advised: "WAMP uses "\" as it's "path separator" rather than the "/" as on LAMP, so you should change your config line to: $conf['cache_backends'] = array('sites\all\modules\filecache\filecache.inc');"

So I updated the settings.php file accordingly and the error changed to a similar one:

"( ! ) Fatal error: require_once() [function.require]: Failed opening required 'C:\wamp\www\bellsauce/sites\allmodules\filecache\filecache.inc' (include_path='.;C:\php\pear') in C:\wamp\www\bellsauce\includes\bootstrap.inc on line 2297"

What could be missing?

Comments

simg’s picture

Hmm, well (I think*) the problem is still you have a "/" in the path rather than a "\" just after "bellsauce".

* PHP documentation seems ambiguous as to whether PHP automatically handles switching the directory seperators between Windows / Unix.

Can you try 2 things.

1. Check that C:\wamp\www\bellsauce/sites/all/modules/filecache/filecache.inc path is correct (ie the exists there and is readable by the webserver (IIS?)

2. If that looks fine just try editing the following file
drupal_root/ includes/bootstrap.inc approximately line 2297

function _drupal_bootstrap_page_cache() {
  global $user;

  // Allow specifying special cache handlers in settings.php, like
  // using memcached or files for storing cache information.
  require_once DRUPAL_ROOT . '/includes/cache.inc';
  foreach (variable_get('cache_backends', array()) as $include) {
    require_once DRUPAL_ROOT . '/' . $include;
  }

Change:
require_once DRUPAL_ROOT . '/' . $include;

to
require_once DRUPAL_ROOT . '\' . $include;

(This wouldn't be a permanent fix but just want to check if that makes a difference)

ojchris’s picture

I'm using apache.

whether I use sites/all/modules/filecache/filecache.inc or sites\all\modules\filecache\filecache.inc it does not make any difference.

and when I attempted changing require_once DRUPAL_ROOT . '/' . $include; to
require_once DRUPAL_ROOT . '\' . $include; as suggested, I get an syntax error indication from my dreamweaver IDE.

ojchris’s picture

I decided to upload FileCache to the site host server. Site runs normally, with no errors. But I notice this at http://drupal.org/node/1153796 that enabling the module ought to create a folder ".ht.filecache" in the files directory in sites/default.

But I didn't find any thing of such. Is this correct or wrong?

ogi’s picture

.ht.filecache is created by filecache to serve as default directory when conf['filecache_directory'] is not defined and Apache web server is used. Default Drupal .htaccess protects all filenames that begin with .ht.

simg’s picture

> I get an syntax error

at risk of sarcasm, you'd be surprised how helpful the actual error message would be ...

simg’s picture

For now, lets just disable Filecache and use the default database cache. This isn't quite as fast as filecache, but will still give you a very significant speed improvement. Once we have authcache working then we can think again about filecache.

So, change your settings.php to just:

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

ie just comment out all the other authcache related lines, so it's just the above.

Then to test if Authcache is working, go to and enable authcache debugging. This will give you an indication that Authcache is working and how much of a performance increase you're getting.

ojchris’s picture

my host advice switching to PHp fastCGI and that seem to already improve things. I don't get the errror I use to. Still, I'll try out your autocache recom later today and let you know how it goes. Will not hurt improcve things further.