Thanks for the help! Okay, so the site in question is http://www.misionmeadows.org/2006/
My sidebar looks like this:
<div class="sidebox"><h3><?php _e('Camp Gallery'); ?></h3></div>
<div class="sidebox"><h3><?php _e('Want More?'); ?></h3></div>
- <?php wp_list_pages('title_li='); ?>
You are correct in that if I put the external include at the bottom of the sidebar page, after all of the internal wp-includes, all is fine. It's only when I run it before any internal wp-includes is there an issue.
As far as I can tell, this is the only thing I can find in the external random.php file that is the name of the database:
$site_db = new Db($db_host, $db_user, $db_password, $db_name);
So I tried adding mysql_close($site_db); to the end of the random.php file like this:
echo "Comments: $image_comments<br>\n";
However, it doesn't seem to do anything. If I remove the $site_db from the string, the errors disappear, but so does the wp-includes...
I'm wondering if there is another database name somewhere floating around?