Login to download the latest version of Mint and your favorite Pepper, purchase additional licenses, or post in the Forum. Don't have an account? Create one!

In Partnership with Media Temple

Mint Forum

Bird Feeder and PHP Fatal error

MacManX
Minted
Posted on Feb 23, '07 at 08:37 pm

I just installed and activated Bird Feeder without Seed functionality and everything appeared to be working fine until I made my first post since its activation. Everything is functioning normally, but my server error log is now beginning to fill up with these errors for the various feed files (not just wp-rss2.php):

PHP Fatal error: Call to a member function on a non-object in /*****/*****/public_html/blog/wp-rss2.php on line 4

Per the instructions, I have added this to the very top of each feed file:

<?php define('BIRDFEED', 'Entries (Atom)'); include($_SERVER['DOCUMENT_ROOT'].'/feeder/index.php'); $wpdb->select(DB_NAME); ?>

This is line 4 of each feed file:

$wpdb->select(DB_NAME);

I’m using WordPress v2.0.9, Mint v2.03, and Bird Feeder v2.02.

Shaun Inman
Mint/Pepper Developer
Posted on Feb 24, '07 at 08:42 am

Hmm, try moving that entire code block after:

if (empty($wp)) {
    require_once('wp-config.php');
    wp('feed=<feed type>');
}

Are you using caching on your feeds (I’m not familiar enough with Wordpress to know if that’s even an option)?

MacManX
Minted
Posted on Feb 24, '07 at 06:27 pm

Thanks! Moving it after the entire PHP block that you mentioned above appears to work properly. I’ll let it run for a few hours and let you know how it goes.

If this does work, you may want to simply the explanation by asking users to add the Feeder code just above this line in the regular feed files (which is the next PHP block):

<?php echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>'; ?>

and just above this line in wp-commentsrss2.php:

<!-- generator="wordpress/<?php echo $wp_version ?>" -->

I’d also like to point out that the problem did not occur with the permalinked feeds (/feed/), only with direct calls to the files (wp-rss2.php etc). Direct calls to the files are the default way of obtaining the feeds when permalinks have not been set.

MacManX
Minted
Posted on Feb 24, '07 at 06:55 pm

P.S. I do have WordPress’ object cache enabled, but it shouldn’t be affecting the feeds.

MacManX
Minted
Posted on Feb 25, '07 at 06:32 pm

After a day’s worth of testing, I can comfortably confirm that the feeds are now functioning properly with absolutely no logged errors. Thanks!

MacManX
Minted
Posted on Feb 26, '07 at 03:01 am

The madness may not be over yet. See: Bird Feeder and WordPress Feed Miscount.

You must be logged in to reply. Login above or create an account