I'm not sure if this is actually blocking page views because I can't reproduce it myself. I noticed this in the error log today:
....
[Wed Feb 28 17:41:53 2007] [error] [client XX.XX.XX.XXX] PHP Notice: Undefined property: stdClass::$cache in /web/drupal5/includes/session.inc on line 77
[Wed Feb 28 17:50:41 2007] [error] [client XXX.X.XXX.X] PHP Notice: Undefined property: stdClass::$cache in /web/drupal5/includes/cache.inc on line 37
[Wed Feb 28 17:50:41 2007] [error] [client XX.XX.XXX.XXX] PHP Notice: Undefined property: stdClass::$cache in /web/drupal5/includes/session.inc on line 73
[Wed Feb 28 18:10:58 2007] [error] [client X.X.XX.X] PHP Notice: Undefined property: stdClass::$cache in /web/drupal5/includes/cache.inc on line 37, referer: http://www.google.com/search?sourceid=navclient&aq=t&ie=UTF-8&rls=GGLG,G...
[Wed Feb 28 18:10:58 2007] [error] [client XX.X.X.XXX] PHP Notice: Undefined property: stdClass::$cache in /web/drupal5/includes/session.inc on line 77, referer: http://www.google.com/search?sourceid=navclient&aq=t&ie=UTF-8&rls=GGLG,G...
....
There were scores of these today in both session.inc and cache.inc.
I'm running PHP 5.2 on a FreeBSD 6.2 box w/MySQL 5.0.33 and very few third-party modules.
Could this be related to PHP 5.2's new object memory management which was causing problems with the $user object disappearing in session.inc v4.6?
Comments
Comment #1
smanes commentedActually, I just reproduced it. I turned off caching this evening, turned it back on and hit the home page as an anonymous user. The first page hit didn't dump an error to the log (possibly because it hadn't been re-cached) but subsequent hits spit that session.inc and cache.inc error into the error log.
The page displays fine but I suspect it may not be hitting cache because of this error.
I'm running with a 5 minute expiry on the cache, if this matters. No CSS aggregation. And APC.
Comment #2
smanes commentedAlso, Caching mode = Normal.
Comment #3
smanes commentedI plugged some debugging code into cache.inc and hit the (cached) home page as an anonymous user:
------------------
function cache_get($key, $table = 'cache') {
global $user;
print "
"; exit; // <<
...
-----------------
This the $user object that the function is seeing with cache enabled for anonymous users:
stdClass Object
(
[uid] => 0
[hostname] => 192.168.1.2
[roles] => Array
(
[1] => anonymous user
)
[session] =>
)
$user->cache doesn't exist in the object.
Comment #4
bwynants commentedsame here.... CVS version of 5.1
Comment #5
bwynants commentedanonymous user on front page...
Notice: Undefined property: stdClass::$cache in /Users/bwynants/Sites/www.goju-ryu.local/includes/session.inc on line 77
Stack trace:
1. {main}() /Users/bwynants/Sites/www.goju-ryu.local/index.php:0
2. drupal_bootstrap() /Users/bwynants/Sites/www.goju-ryu.local/index.php:13
3. _drupal_bootstrap() /Users/bwynants/Sites/www.goju-ryu.local/includes/bootstrap.inc:839
4. _drupal_cache_init() /Users/bwynants/Sites/www.goju-ryu.local/includes/bootstrap.inc:886
5. sess_write() /Users/bwynants/Sites/www.goju-ryu.local/includes/session.inc:0
Comment #6
gatman commentedHaving same log error
PHP Notice: Undefined property: stdClass::$cache in /var/www/html/includes/cache.inc on line 37, referer: http://www.somedomain.com/
PHP Notice: Undefined property: stdClass::$cache in /var/www/html/includes/session.inc on line 77, referer: http://www.somedomain.com/
Apache 2 / Php5 / MySQL 4.x / Drupal 5x
Comment #7
nerdymark commentedSame here. I'm also having issues with changing Site Name and defaulting a new theme. Think it's related?
Comment #8
owen barton commentedDupe of http://drupal.org/node/111697