I'm using the following caching configuration in settings.php:

$conf['page_cache_without_database'] = TRUE;
$conf['page_cache_invoke_hooks'] = FALSE;
$conf['page_cache_maximum_age'] = 300;
$conf['cache_lifetime'] = 3600;

When playing with blocks and regions, the following PHP notice popped up and there were no more of it.

Notice: Undefined property: stdClass::$cache in DrupalAPCCache->prepareItem() (line 97 of /srv/drupal/sites/all/modules/apc/drupal_apc_cache.inc).

I'm guessing that page_cache_without_database leads to unloaded $user and so this PHP notice happen. If this is the reason, it'd be good to be fixed :-)

CommentFileSizeAuthor
#9 1056130.patch804 bytesR.Muilwijk
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

threading_signals’s picture

I'm getting this: WD php: Warning: apc_cache_info(): No APC info available. Perhaps APC is not enabled? Check apc.enabled in your ini file in DrupalAPCCache->clear() (line 236 of [warning]
/var/www/......../apc/drupal_apc_cache.inc).

Within drupal_apc_cache.inc at lines 234-237:
else {
if ($wildcard) {
$data = apc_cache_info('user');
$count = count($data['cache_list']);

ogi’s picture

Well, this sounds like APC is not enabled. You may go to Reports - Status report - (PHP) more information to check.

threading_signals’s picture

I built mine from source:

APC 3.1.7
The APC module needs the apc extension see: http://www.php.net/apc.

APC is enabled and running...? [APC is getting cache hits] Do you know what kind of configuration the module is looking for? Since this probably only affects the user cache. I am getting hits to all the caches, but it's not talking to the drupal apc module, at least for the user cache section.

ogi’s picture

You should have filed another issue for that.

Anyway, this WD indicates that it's about drush so it's normal to have such warning. Try apc.enable_cli=1 in PHP ini file where you have added extension=apc.so.

threading_signals’s picture

Thanks for the tips. That got rid of the drush errors. On the status page, I still get:

APC 3.1.7
The APC module needs the apc extension see: http://www.php.net/apc.

Actually, I don't know. I forgot I disabled the apc module in settings.php, because I'm getting this (I will start a new issue, and link it here later):

==> /var/log/postgresql/error.log <==
2011/03/02 09:14:52 [error] 6132#0: *3899 FastCGI sent in stderr: "PHP Fatal error: Call to undefined function db_select() in /var/www/drupal-7.0/includes/cache.inc on line 328" while reading response header from upstream,

ogi’s picture

This message in Status report is just informational. It's misleading that something is wrong but in reality it means everything is OK.

This db_select error is very strange because it's very important core function. And why it's in PostgreSQL log? Probably you meant httpd's error.log.

threading_signals’s picture

No, I do tail -f /var/log/postgresql/*log

I have symlinks in there to follow a variety of error messages and nginx hasn't said anything. I'm using syslog and have turned off database logging. So you are right, error.log is nginx error log. I should've cleared that up. So far, I cannot use this module.

threading_signals’s picture

Perhaps it's related to domain access: http://drupal.org/node/1052788

On other sites, apc module is working fine, even with:

$conf['page_cache_maximum_age'] = 300;
$conf['cache_lifetime'] = 3600;

Edit: I'm just going to reinstall this site since I can't afford to spend time figuring this out. Please follow up for the benefit of others if appropriate, thank you.

R.Muilwijk’s picture

Status: Active » Fixed
FileSize
804 bytes

I have comitted (http://drupalcode.org/project/apc.git/commit/27f5ee0) the attached patch.

Status: Fixed » Closed (fixed)

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