WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#15975 closed defect (bug) (duplicate)

Worpdress generates copious non-object errors

Reported by: pixelgeek Owned by:
Milestone: Priority: normal
Severity: critical Version: 3.0.3
Component: Database Keywords: reporter-feedback
Focuses: Cc:

Description

Since I have been upgrading to 3.03 Wordpress 3.03 the system has been generating copious numbers of non-object access errors. These are almost all in relation to $wpdb and are generating fatal errors that are bringing my server down on a frequent basis

For example

PHP Fatal error: Call to undefined function require_wp_db() in /var/www/tabletopgamingnews.com/wp-settings.php on line 71

PHP Fatal error: Call to a member function set() on a non-object in /var/www/tabletopgamingnews.com/wp-includes/cache.php on line 146

PHP Fatal error: Call to a member function get_row() on a non-object in /var/www/tabletopgamingnews.com/wp-includes/functions.php on line 327

I am fixing these by putting in is_object tests to try to catch them but I am not sure why these are cropping up with such regularity now

Change History (10)

comment:1 @nacin4 years ago

Are you using super cache?

comment:2 @SergeyBiryukov4 years ago

Or something like DB Cache?

comment:3 @westi4 years ago

  • Keywords reporter-feedback added

Check all the files have been uploaded correctly.

comment:4 follow-up: @nacin4 years ago

I say super cache due to #15881.

comment:5 in reply to: ↑ 4 @dd324 years ago

Replying to nacin:

I say super cache due to #15881.

Sounds like exactly the same thing to me.

comment:6 @pixelgeek4 years ago

I am using WP Super Cache but these errors are new since 3.03 and seem to be unrelated to WP Super Cache since it isn't the cache.php file that is causing the problem.

comment:7 @dd324 years ago

Closing as duplicate of #15881

I am using WP Super Cache but these errors are new since 3.03 and seem to be unrelated to WP Super Cache since it isn't the cache.php file that is causing the problem.

Super Cache is calling a function, which calls a function, which produces these fatal errors, It's all caused by Super Cache calling a function before the time is right(Or in super cache's instance, calling it too late on certain setups where the Garbage collector has already started destroying things), If you call conditionals before WP_Query is set up, or if you call Caching functions before WP_Cache is setup, then you'll hit these errors. These are a "known problem" of plugins doing something and expecting it to work, yet it really has never worked, just been ignored.

comment:8 @dd324 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

comment:9 @dd324 years ago

And upon noticing you reported the other ticket.. It sounds like you have one of the few configurations which cause this. Can you duplicate your non-object errors on a fresh installation without plugins?

comment:10 @nacin4 years ago

A note, it's impossible to call caching functions before the cache is set up, as the cache gets set up immediately after being included.

This is purely a shutdown object destruction problem, unfortunately.

Note: See TracTickets for help on using tickets.