Im currently setting up and enabling the APC module version 3.1.13. I have followed readme.txt instructions and have followed the steps correctly. Following this, I check my status report which says: APC has been running for XX minutes. Currently caching 28 entries (1.28 MB).
I then perform a database update and I get the WSOD (White Screen Of Death). I have checked my Apache error logs and Im receiving this below:
PHP Fatal error: Class 'DrupalAPCCache' not found in /DRUPAL_ROOT/includes/cache.inc on line 31
1) I have added the following code to the settings.php file from step 2 in readme.txt
$conf['cache_backends'] = array('sites/all/modules/apc/drupal_apc_cache.inc');
$conf['cache_class_cache'] = 'DrupalAPCCache';
$conf['cache_class_cache_bootstrap'] = 'DrupalAPCCache';
//$conf['apc_show_debug'] = TRUE; // Remove the slashes to use debug mode.
$conf['page_cache_without_database'] = TRUE;
$conf['page_cache_invoke_hooks'] = FALSE;
2) I have replaced the bottom code in DRUPAL_ROOT/includes/cache.inc
variable_get('cache_default_class', 'DrupalDatabaseCache');
to
variable_get('cache_default_class', 'DrupalAPCCache');
I return to my site and get the White Screen AND the exact same error in my logs.
Does anyone have suggestions on this matter, i cannot seem to find much help or documentation on this anywhere.
-Thank YOu
Comments
Comment #0.0
Ndesign CreditAttribution: Ndesign commentedfurther explanation
Comment #1
Ndesign CreditAttribution: Ndesign commentedComment #2
Ndesign CreditAttribution: Ndesign commentedIm also running Varnish and would like to enable Memcache as well.
Comment #3
ktrev CreditAttribution: ktrev commentedI am also getting the same error..Can you please explain how you fixed it
Comment #4
Ndesign CreditAttribution: Ndesign commentedthis issue was not fixed and is still open, I accidentally changed the status : z
I have looked deeply in to this issue with no solution so far.
Comment #5
DavidPetit CreditAttribution: DavidPetit commentedHi ! I have a similar problem. I have also APC version 3.1.13 but PHP 5.4.
Every thing seems to work well on apache but when trying drush I got this same error:
Class 'DrupalAPCCache' not found in /data/www/cdanews/includes/cache.inc, line 31
Comment #6
R.Muilwijk CreditAttribution: R.Muilwijk commentedDid you add the correct path to the cache_backends array? Try doing this in your settings.php which would make sure the class is loaded:
include_once DRUPAL_ROOT . '/sites/all/modules/contrib/apc/drupal_apc_cache.inc';
Comment #7
DavidPetit CreditAttribution: DavidPetit commentedHi,
I have this line: "$conf['cache_backends'] = array('sites/all/modules/contrib/apc/drupal_apc_cache.inc');" in my settings.php file.
Comment #8
henkit CreditAttribution: henkit commentedDo you perhaps have any other alternations to the settings.php? In my case i do have the line include DRUPAL_ROOT . '/sites/all/modules/domain/settings.inc'; in my settings php for domain access.
If i put the APC changes from step 2 after the domain access line i get the same errors...if i put them before the domain access line it works like a charm
Comment #9
Ndesign CreditAttribution: Ndesign commentedThank you henkit..I too also have DRUPAL_ROOT . '/sites/all/modules/domain/settings.inc'. I will give your suggestion a try ; )
Comment #10
DavidPetit CreditAttribution: DavidPetit commentedThanks henkit ! It was the same cause for me !
Comment #11
mattew CreditAttribution: mattew commentedI had the same issue, using domain module include in my settings.php.
I think this information should be given in some ways in the README.txt of APC. Somethings likes "Add the following code to your settings.php file before any other inclusion : ..."
Best regards.
Comment #11.0
mattew CreditAttribution: mattew commentedapc revision
Comment #12
Dustin@PI CreditAttribution: Dustin@PI commentedNote: If you are using multiple cache back ends, then if you are using the
= array('..
syntax multiple times in your settings.php file, it will assign a new array each time.Eg,
but this is fine: