White Page of death

klymaxx - September 6, 2009 - 21:06
Project:Cache Router
Version:6.x-1.0-rc1
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

Newest Install of Drupal 6.13

then i installed memcache module
installed memcache files to server
pecl files needed
then cache router
and tried adding this to

settings.php of drupal
$conf['cache_inc'] = './sites/all/modules/contrib/cacherouter/cacherouter.inc';
$conf['cacherouter'] = array(
'default' => array(
'engine' => 'memcache',
'server' => array(),
'shared' => TRUE,
'prefix' => '',
'path' => './sites/default/files/filecache',
'static' => FALSE,
'fast_cache' => TRUE,
),
);

The white page of death only shows after adding that to settings.php. What am i doing wrong?

#1

kostajh - September 7, 2009 - 03:21

This line in the instructions has a typo:

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

delete the bit that says "contrib" so it says:

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

#2

klymaxx - September 7, 2009 - 05:25

This is what i have that has to do with cacherouter and memcache in my settings.php file. I'm still getting the white screen of death. No logs on the server to say whats going on.

$conf = array(
// The path to wherever memcache.inc is. The easiest is to simply point it
// to the copy in your module's directory.
'cache_inc' => './sites/all/modules/memcache/memcache.inc',
// or
// 'cache_inc' => './sites/all/modules/memcache/memcache.db.inc',
);

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

#3

klymaxx - September 7, 2009 - 12:03

[Sun Sep 06 14:01:23 2009] [error] [client 98.155.53.141] PHP Fatal error: require_once() [function.require]: Failed opening required './sites/all/modules/contrib/cacherouter/cacherouter.inc' (include_path='.:') in /var/www/vhosts/mysite.com/httpdocs/includes/bootstrap.inc on line 1003
[Sun Sep 06 14:01:41 2009] [error] [client 98.155.53.141] PHP Warning: require_once(./sites/all/modules/contrib/cacherouter/cacherouter.inc) [function.require-once]: failed to open stream: No such file or directory in /var/www/vhosts/mysite.com/httpdocs/includes/bootstrap.inc on line 1003

#4

klymaxx - September 28, 2009 - 20:13

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

is what i put in but i think its the way i set it up thats causing it to break. On the module page instructions listed:
server is only used in memcache and should be an array of host:port combinations. (e.g. 'server' => array('localhost:11211', 'localhost:11212'))

I left this blank as i read using default is fine? Is that okay?

path is new in beta3 for 5.x and 6.x branches. It allows you to override the default of /tmp/filecache for storing files when using the "file" caching type. *update this now works as of beta8. Also note: when using this module with multi-site setups, you need to change this to point to the file cache for each site. (e.g. sites/site1.com/files/filecache, sites/site2.com/files/filecache) or you WILL have cache corruption.

The directory i've made is located at sites/default/files/filecache
With that said is my path set correctly? sites/whish-seeds.com/default/files/filecache

#5

JirkaRybka - September 17, 2009 - 15:18

gizmatix: For one thing, you seem to be installing two different modules for the same task. The two parts in #2 (as far as I understand) define the same override twice, one for memcache module (which you most probably don't need with cacherouter, as it duplicates the same functionality, and both can't run at the same time - cacherouter, as far as I know, have own memcache engine included), and the other part in #2 does essentially the same for cacherouter, essentially overwriting what the first part did, making that first part (along with referenced memcache module) unused.

#3 indicates, that you've the 'contrib' part in the path, though. That's a bad example in the docs, but generally you need the path to match the actual location in your filesystem.

Otherwise I don't know about memcache-specific configuration, so I say nothing about that part.

Edit: But the path is for file engine, quite a different thing (storing in local filesystem). If using that, you need it to point to your files/tmp directory or similar (although I had a bit of other problems with that too). But your config specifies memcache as the engine, so you need to configure the memcache server I guess (or switch to file engine if local file-storage is desired).

 
 

Drupal is a registered trademark of Dries Buytaert.