Enabled the module. Went to admin/settings/performance/cache-backend and got a WSOD.

So I enabled errors and saw the following:

Fatal error: Class 'DrupalDatabaseCache' not found in /home/xxxx/public_html/modules/cache_backport/cache_backport.admin.inc on line 65

I'm also getting this:

Default backend named 'DrupalDatabaseCache' does not exists, the system is gracefully downgrading to 'DrupalDatabaseCache'. You should fix your settings.php file.

Did I do something wrong?

Here's my settings.php:

$conf['cache_inc'] = 'modules/cache_backport/cache.inc';
$conf['redis_client_interface']      = 'Predis';
$conf['cache_backends'][]            = 'modules/redis/redis.autoload.inc';
$conf['cache_prefix'] = array('default' => 'cbn-redis');
 # Handle these with Redis #
	$conf['cache_default_class']          = 'Redis_Cache';
	$conf['cache_class_cache_bootstrap']  = 'Redis_Cache'; 
	$conf['cache_class_cache']            = 'Redis_Cache';
	$conf['cache_class_cache_block']      = 'Redis_Cache';
	$conf['cache_class_cache_content']    = 'Redis_Cache';
	$conf['cache_class_cache_form']       = 'Redis_Cache';
	$conf['cache_class_cache_menu']       = 'Redis_Cache';
	$conf['cache_class_cache_page']       = 'Redis_Cache';
	$conf['cache_class_cache_rules']      = 'Redis_Cache';
	$conf['cache_class_cache_views']      = 'Redis_Cache';
	$conf['cache_class_cache_views_data'] = 'Redis_Cache';
  $conf['cache_class_cache_form'] = 'DrupalDatabaseCache';
  $conf['lock_inc'] = 'modules/redis/redis.lock.inc';
 $conf = array(
   // The path to wherever memcache.inc is. The easiest is to simply point it
   // to the copy in your module's directory.
   'mimedetect_magic' => '',
 );
$conf['reverse_proxy'] = TRUE;
$conf['reverse_proxy_addresses'] = array('127.0.0.1');
include './modules/domain/settings.inc';

Comments

labboy0276’s picture

Hello

I am getting the same error on Pantheon:
Fatal error: Class 'DrupalDatabaseCache' not found in /srv/bindings/5206a127a7994a1285594149db21412d/code/sites/all/modules/cache_backport/cache_backport.admin.inc on line 65

$conf['cache_inc'] = 'sites/all/modules/cache_backport/cache.inc';
// Use Redis for caching.
$conf['redis_client_interface'] = 'PhpRedis';
$conf['cache_backends'][] = 'sites/all/modules/redis/redis.autoload.inc';
$conf['cache_default_class'] = 'Redis_Cache';
$conf['cache_prefix'] = array('default' => 'pantheon-redis');
// Do not use Redis for cache_form (no performance difference).
$conf['cache_class_cache_form'] = 'DrupalDatabaseCache';
// Use Redis for Drupal locks (semaphore).
$conf['lock_inc'] = 'sites/all/modules/redis/redis.lock.inc';

My config, used to work just fine... I am on rc-2

labboy0276’s picture

Category: Support request » Bug report
Priority: Normal » Major
pounard’s picture

Hello, sorry for the time I took to answer.

That is an odd bug knowing that the module's database.inc file is supposed to be loaded when _cache_init() is called ; Are you sure the cache.inc file is correctly loaded ? It is supposed to happen when Drupal bootstraps.

pounard’s picture

After a few thoughts, it should have been loaded, if you set a cache_inc variable with a non existing file it is supposed to WSOD.

Could you please try to debug by breaking where Drupal attemps to load the cache_inc file from variables ? With a vanilla core it supposed to happen in the DRUPAL_BOOTSTRAP_EARLY_PAGE_CACHE bootstrap phase.

labboy0276’s picture

Not really sure how to do that.

We have just a d6 site on pantheon if you want to try that.

pjcdawkins’s picture

Same problem here (trying to set up Redis for Drupal 6 on Platform.sh)

abenamer’s picture

I'm getting this error message:

Default backend named 'DrupalDatabaseCache' does not exists, the system is gracefully downgrading to 'DrupalDatabaseCache'. You should fix your settings.php file.

Soon after that, it goes to a error message (WSOD) that says:
Fatal error: require_once(): Failed opening required '/app/public/includes/database/database.inc' (include_path='.:/usr/share/php:/usr/share/pear') in /app/public/sites/all/modules/redis/lib/Redis/AbstractBackend.php on line 33

It seems to be referencing a file that only exists in D7 not D6?

pounard’s picture

Oh right, indeed, need to fix that! Thanks for reporting.

abenamer’s picture

Is there anything else you'll need from me to fix? I'm anxious for a patch.

pounard’s picture

Ok, I will fix this in both Redis 7.x-2.x and Redis 7.x-3.x today. Then I will try to see why the DrupalDatabaseCache is not being found in Cache Backport.

pounard’s picture

Please note that I fixed the Redis module and pushed new releases (will be visible in a few minutes):

  • For Redis 7.x-2.x users, please upgrade to 7.x-2.14
  • For Redis 7.x-3.x users, please upgrade to 7.x-3.8

  • Pierre.R committed 760896c on 6.x-1.x
    Issue #2189275: Fatal error: Class 'DrupalDatabaseCache' not found
    
pounard’s picture

Status: Active » Fixed

Ok, I now also added a new release of the cache_backport module, that will only fix the admin WSOD, I hope, please upgrade to the 6.x-1.0-rc3 version.

Re-open the bug once you upgraded all your modules if you are still experiencing any problem.

pjcdawkins’s picture

Thanks @pounard!

abenamer’s picture

Thanks @pounard! This worked perfectly on four Drupal 6 sites I still admin on platform.sh!

Status: Fixed » Closed (fixed)

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