Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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 :-)
Comment | File | Size | Author |
---|---|---|---|
#9 | 1056130.patch | 804 bytes | R.Muilwijk |
Comments
Comment #1
threading_signals CreditAttribution: threading_signals commentedI'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']);
Comment #2
ogi CreditAttribution: ogi commentedWell, this sounds like APC is not enabled. You may go to Reports - Status report - (PHP) more information to check.
Comment #3
threading_signals CreditAttribution: threading_signals commentedI 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.
Comment #4
ogi CreditAttribution: ogi commentedYou should have filed another issue for that.
Anyway, this
WD
indicates that it's aboutdrush
so it's normal to have such warning. Tryapc.enable_cli=1
in PHP ini file where you have addedextension=apc.so
.Comment #5
threading_signals CreditAttribution: threading_signals commentedThanks 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,
Comment #6
ogi CreditAttribution: ogi commentedThis 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'serror.log
.Comment #7
threading_signals CreditAttribution: threading_signals commentedNo, 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.
Comment #8
threading_signals CreditAttribution: threading_signals commentedPerhaps 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.
Comment #9
R.Muilwijk CreditAttribution: R.Muilwijk commentedI have comitted (http://drupalcode.org/project/apc.git/commit/27f5ee0) the attached patch.