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/ 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/');
$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/

variable_get('cache_default_class', 'DrupalDatabaseCache');
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


Ndesign’s picture

Issue summary:View changes

further explanation

Ndesign’s picture

Title:PHP Fatal error: Class 'MemCacheDrupal' not found in on line 31» PHP Fatal error: Class 'DrupalAPCCache' not found in on line 31
Status:Active» Closed (fixed)
Ndesign’s picture

Status:Closed (fixed)» Active

Im also running Varnish and would like to enable Memcache as well.

ktrev’s picture

I am also getting the same error..Can you please explain how you fixed it

Ndesign’s picture

this 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.

DavidPetit’s picture

Hi ! 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/, line 31

R.Muilwijk’s picture

Status:Active» Postponed (maintainer needs more info)

Did 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/';

DavidPetit’s picture

I have this line: "$conf['cache_backends'] = array('sites/all/modules/contrib/apc/');" in my settings.php file.

henkit’s picture

Do 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/'; 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

Ndesign’s picture

Thank you henkit..I too also have DRUPAL_ROOT . '/sites/all/modules/domain/'. I will give your suggestion a try ; )

DavidPetit’s picture

Thanks henkit ! It was the same cause for me !

mattew’s picture

I 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.

mattew’s picture

Issue summary:View changes

apc revision