After installing and configuring cacherouter+xcache, I started getting these groups of errors in dblog:

fopen() [function.fopen]: SAFE MODE Restriction in effect. The script whose uid is X is not allowed to access /tmp owned by uid 0 in file [snip]/sites/all/modules/cacherouter/Cache.php on line 110
fopen(/tmp/prefix-cache_menu_lock) [function.fopen]: failed to open stream: Success in file [snip]/sites/all/modules/cacherouter/Cache.php on line 110.
flock() expects parameter 1 to be resource, boolean given in file [snip]/sites/all/modules/cacherouter/Cache.php on line 111.
unlink() [function.unlink]: SAFE MODE Restriction in effect. The script whose uid is X is not allowed to access /tmp owned by uid 0 in file [snip]/sites/all/modules/cacherouter/Cache.php on line 124.

Attached is a patch to README.txt which explains how to fix the problem I had.

CommentFileSizeAuthor
#2 readme_txt-2.patch2.58 KBtetramentis
readme_txt.patch2.57 KBtetramentis
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tetramentis’s picture

Status: Active » Needs review
tetramentis’s picture

FileSize
2.58 KB

I got a slightly better patch (attached) thanks to #945650: suggestions for settings.php.

andypost’s picture

+++ README.txt.new	2010-11-23 11:21:49.000000000 +0200
@@ -41,6 +41,7 @@
+    // 'lock_dir' => getcwd() . '/sites/' . $_SERVER['SERVER_NAME'] . '/files/filecache',

getcwd() and $_SERVER['SERVER_NAME'] could be wrong in case multisite.

So I propose to use same string as for 'path'. Users can replace this paths with values by their own

Powered by Dreditor.

tetramentis’s picture

Then maybe my original string would be better than just copying 'path', as it contains a hint to make path absolute:
'lock_dir' => '/absolute/path/to/your/sites/default/files/filecache',

I have tested that in a multisite install and it did work for me, but my multisite might not be what others are using: I'm using DocumentRoot directives for several sites to point at a single Drupal directory.

This is a minor convenience point so generally I don't mind using a simpler string with no code/variables in it.