I got this message when i add the lines from README in "settings":

Warning: fopen(C:\Program Files\wamp\www\mysite/sites/default/files/.ht.filecache/cache_bootstrap-bootstrap_modules) [function.fopen]: failed to open stream: No such file or directory in DrupalFileCache->set() (line 134 of C:\Program Files\wamp\www\mysite\sites\all\modules\filecache\filecache.inc).
Warning: fopen(C:\Program Files\wamp\www\mysite/sites/default/files/.ht.filecache/cache_bootstrap-variable:language:en) [function.fopen]: failed to open stream: Invalid argument in DrupalFileCache->set() (line 134 of C:\Program Files\wamp\www\mysite\sites\all\modules\filecache\filecache.inc).
...... there is 35 warnings like that

Any ideas?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ogi’s picture

It turns out that ":" is reserved file name character in Windows. Please edit filecache.inc and replace return statement in line 56 with the the following simper return:

return urlencode($cid);
Barfly’s picture

Status: Active » Fixed

thank you, it works ^^

Status: Fixed » Closed (fixed)

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

David4514’s picture

Status: Closed (fixed) » Active
FileSize
890 bytes

I hate hacking modules! Would it be possible to put in a test for Windows and perform the simple return, otherwise perform the original return. Something like:


    // see drupal.org/node/1153796
    // Don't do this for Windows.  The ':' character is invalid for a
    // Windows file name.
    if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
      return urlencode($cid);
    }
    else {
      return str_replace('%3A', ':', urlencode($cid));
    }

There may be a more elegant way of doing this, but this seems to work. I can now have this one version on my staging and production sites (Linux) and on my development site (Wampserver).

A proposed patch is attached.

roderik’s picture

Above works, but #1211166-7: Create separate directories for each cache bins fixes it too. By (a.o.) replacing all ':' by another character, on all platforms. (A space.)

ogi’s picture

Priority: Normal » Major

Microsoft Windows is important platform that should be supported.

ogi’s picture

Status: Active » Fixed

Fixed in c787423. I committed the solution provided by roderik to replace : with space and / with ^.

Status: Fixed » Closed (fixed)

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