Hi,

I can't get the caching engine "file" to work.

Configured in settings.pph as follows:

$conf['cache_inc'] = './sites/all/modules/cacherouter/cacherouter.inc';
$conf['cacherouter'] = array(
'default' => array(
'engine' => 'file',
),
);

This results in:

Warnings (green):

Failed to create directory .
Failed to create directory /cache.
Failed to create directory /cache/8.

Errors (red):

Cache write error, failed to open file "/cache/8/87cd8b8808600624d8c590cfc2e6e94b--variables"

On top of the page (outside Drupal):

Warning: mkdir() [function.mkdir]: No such file or directory in /var/www/drupal/sites/all/modules/cacherouter/engines/file.php on line 183

Warning: mkdir() [function.mkdir]: Permission denied in /var/www/drupal/sites/all/modules/cacherouter/engines/file.php on line 183

Warning: mkdir() [function.mkdir]: No such file or directory in /var/www/drupal/sites/all/modules/cacherouter/engines/file.php on line 183

Warning: Cannot modify header information - headers already sent by (output started at /var/www/drupal/sites/all/modules/cacherouter/engines/file.php:183) in /var/www/drupal/includes/bootstrap.inc on line 569

Warning: Cannot modify header information - headers already sent by (output started at /var/www/drupal/sites/all/modules/cacherouter/engines/file.php:183) in /var/www/drupal/includes/bootstrap.inc on line 570

Warning: Cannot modify header information - headers already sent by (output started at /var/www/drupal/sites/all/modules/cacherouter/engines/file.php:183) in /var/www/drupal/includes/bootstrap.inc on line 571

Warning: Cannot modify header information - headers already sent by (output started at /var/www/drupal/sites/all/modules/cacherouter/engines/file.php:183) in /var/www/drupal/includes/bootstrap.inc on line 572

Where is Cache Router trying to create directories? Those do exist:

drwxrwxr-x  2 www-data root     4,0K 24. Feb 22:58 cache
drwxr-xr-x 12 www-data root     4,0K  8. Feb 01:17 files

Regards, -asb

Comments

daphisto’s picture

Hmm, I'm having the exact same problem. Will let you know if I come across a solution.

andypost’s picture

files folder should be chmod 777

asb’s picture

chmod 777 files
chmod 777 cache
...
drwxrwxrwx  2 www-data www-data 4,0K 24. Feb 19:03 cache
drwxrwxrwx 12 www-data www-data 4,0K 27. Feb 00:49 files

Result (on top of the page):

Warning: mkdir() [function.mkdir]: No such file or directory in /var/www/drupal/sites/all/modules/cacherouter/engines/file.php on line 183

Warning: mkdir() [function.mkdir]: Permission denied in /var/www/drupal/sites/all/modules/cacherouter/engines/file.php on line 183

Warning: mkdir() [function.mkdir]: No such file or directory in /var/www/drupal/sites/all/modules/cacherouter/engines/file.php on line 183

Warning: Cannot modify header information - headers already sent by (output started at /var/www/drupal/sites/all/modules/cacherouter/engines/file.php:183) in /var/www/drupal/includes/bootstrap.inc on line 569

Warning: Cannot modify header information - headers already sent by (output started at /var/www/drupal/sites/all/modules/cacherouter/engines/file.php:183) in /var/www/drupal/includes/bootstrap.inc on line 570

Warning: Cannot modify header information - headers already sent by (output started at /var/www/drupal/sites/all/modules/cacherouter/engines/file.php:183) in /var/www/drupal/includes/bootstrap.inc on line 571

Warning: Cannot modify header information - headers already sent by (output started at /var/www/drupal/sites/all/modules/cacherouter/engines/file.php:183) in /var/www/drupal/includes/bootstrap.inc on line 572

...and Warnings (green):

Failed to create directory .
Failed to create directory /cache.
Failed to create directory /cache/8.

...and Errors (red):

Cache write error, failed to open file "/cache/8/87cd8b8808600624d8c590cfc2e6e94b--variables"
najibx’s picture

give 'path'. I use the following instead and this error gone, but another shows up http://drupal.org/node/353815

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

slantview’s picture

Status: Active » Fixed

This should be fixed in the next release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.