Spiders/crawlers/bots filling up log with errors

0 views
Skip to first unread message

Thor Frølich

unread,
Oct 25, 2008, 3:27:41 AM10/25/08
to habari-users
(Sorry for posting again, but having found out more it needed a new
subject line)

Yahoo and Google's indexing spiders are generating a lot of "Trying to
get property of non-object in home.php" errors on my site
(www.abekat.net). My database rapidly balloons in size because of
this. Normal visits don't create errors.

Anyone here know what makes these spider visits special (different
parsing, reading files out of order, xml weirdness)? I don't have a
robot.txt. Do I need one?

Thanks,

Thor

Michael Bishop

unread,
Oct 26, 2008, 11:10:30 AM10/26/08
to habari-users
Have you tried the session manager plugin? You can exclude such bots
from being logged.

You can find it in the -extras repo, or http://www.habariproject.org/dist/plugins/session_manager.zip

~miklb

Thor Frølich

unread,
Oct 27, 2008, 5:38:28 AM10/27/08
to habari-users
I'll give that a go.

Thanks for your suggestion,

Thor

On Oct 26, 4:10 pm, Michael Bishop <miklb.onl...@gmail.com> wrote:
> Have you tried the session manager plugin?  You can exclude such bots
> from being logged.
>
> You can find it in the -extras repo, orhttp://www.habariproject.org/dist/plugins/session_manager.zip

Thor Frølich

unread,
Dec 5, 2008, 3:49:34 AM12/5/08
to habari-users
The session manager plug-in doesn't help in this case, since errors
are still logged - only the session entry is suppressed. My only
option is to figure out why the bots trigger all these "non-object"
errors.

It seems to be almost every line in home.php containing php-code that
generates an error?! What terrible mistake could I have put in there
to cause this?

Thanks,

Thor

On Oct 27, 10:38 am, Thor Frølich <krudtka...@gmail.com> wrote:
> I'll give that a go.
>
> Thanks for your suggestion,
>
> Thor
>
> On Oct 26, 4:10 pm, Michael Bishop <miklb.onl...@gmail.com> wrote:
>
> > Have you tried the session manager plugin?  You can exclude such bots
> > from being logged.
>
> > You can find it in the -extras repo, orhttp://www.habariproject.org/dist/plugins/session_manager.zip
>
> > ~miklb
>

Michael Harris

unread,
Dec 5, 2008, 3:51:54 AM12/5/08
to habari...@googlegroups.com
2008/12/5 Thor Frølich <krudt...@gmail.com>:

>
> The session manager plug-in doesn't help in this case, since errors
> are still logged - only the session entry is suppressed. My only
> option is to figure out why the bots trigger all these "non-object"
> errors.
>
> It seems to be almost every line in home.php containing php-code that
> generates an error?! What terrible mistake could I have put in there
> to cause this?

Could you provide the errors and your code ?

--
Michael C. Harris, School of CS&IT, RMIT University
http://twofishcreative.com/michael/blog
IRC: michaeltwofish #habari

Thor Frølich

unread,
Dec 5, 2008, 5:53:28 AM12/5/08
to habari-users
It's probably something simple, but I'm an idiot with php and css.

The errors look like this, but for a large number of lines:

Trying to get property of non-object in user/themes/abekat/home.php:25

Here's my home.php:


<?php $theme->display( 'header'); ?>
<!-- home -->

<div id="primary">
<?php $post=reset($posts); ?>
<!-- <div class="tags"><?php echo $post->tags_out;?></div> -->
<div id="primaryheadline"><a href="<?php echo $post->permalink; ?
>"title="<?php echo $post->title; ?>"><?php echo $post->title_out; ?></
a></div>
<div class="meta"><?php if ( $show_author ) { ?> <?php _e('af'); ?>
<?php echo $post->author->displayname; ?> <?php } ?></div>
<div id="primarycontent"><?php echo $post->content_out; ?></div>
<div class="meta-comments"><a href="<?php echo $post->permalink; ?
>#comments" title="<?php _e('Comments to this post'); ?>"><?php echo
$post->comments->approved->count; ?>
<?php echo _n( 'kommentar', 'kommentarer', $post->comments->approved-
>count ); ?></a></div>
<div style="clear:both;"></div> <!-- Cheat to get parent div to
expand to encompass nested divs -->
</div>

<div id="secondary">
<div class="secondaryleft">
<?php $post=next($posts); ?>
<!-- <div class="tags"><?php echo $post->tags_out;?></div> -->
<div class="secondaryheadline">
<a href="<?php echo $post->permalink; ?>"title="<?php echo $post-
>title; ?>"><?php echo $post->title_out; ?></a>
</div>
<div class="meta"><?php if ( $show_author ) { ?> <?php _e('af'); ?>
<?php echo $post->author->displayname; ?> <?php } ?></div>
<?php echo $post->content_out; ?>
<div class="meta-comments"><a href="<?php echo $post->permalink; ?
>#comments" title="<?php _e('Comments to this post'); ?>"><?php echo
$post->comments->approved->count; ?>
<?php echo _n( 'kommentar', 'kommentarer', $post->comments->approved-
>count ); ?></a></div>
<div style="clear:both;"></div> <!-- Cheat to get parent div to
expand to encompass nested divs -->
</div>
<div class="secondaryright">
<?php $post=next($posts); ?>
<!-- <div class="tags"><?php echo $post->tags_out;?></div> -->
<div class="secondaryheadline">
<a href="<?php echo $post->permalink; ?>"title="<?php echo $post-
>title; ?>"><?php echo $post->title_out; ?></a>
</div>
<div class="meta"><?php if ( $show_author ) { ?> <?php _e('af'); ?>
<?php echo $post->author->displayname; ?> <?php } ?></div>
<?php echo $post->content_out; ?>
<div class="meta-comments"><a href="<?php echo $post->permalink; ?
>#comments" title="<?php _e('Comments to this post'); ?>"><?php echo
$post->comments->approved->count; ?>
<?php echo _n( 'kommentar', 'kommentarer', $post->comments->approved-
>count ); ?></a></div>
<div style="clear:both;"></div> <!-- Cheat to get parent div to
expand to encompass nested divs -->
</div>
<div style="clear:both;"></div> <!-- Cheat to get parent div to
expand to encompass nested divs -->
</div>

<div id="tertiary">
<div class="tertiaryleft">
<?php $post=next($posts); ?>
<!-- <div class="tags"><?php echo $post->tags_out;?></div> -->
<div class="tertiaryheadline">
<a href="<?php echo $post->permalink; ?>"title="<?php echo $post-
>title; ?>"><?php echo $post->title_out; ?></a>
</div>
<div class="meta"><?php if ( $show_author ) { ?> <?php _e('af'); ?>
<?php echo $post->author->displayname; ?> <?php } ?></div>
<?php echo $post->content_out; ?>
<div class="meta-comments"><a href="<?php echo $post->permalink; ?
>#comments" title="<?php _e('Comments to this post'); ?>"><?php echo
$post->comments->approved->count; ?>
<?php echo _n( 'kommentar', 'kommentarer', $post->comments->approved-
>count ); ?></a></div>
</div>
<div class="tertiarycenter">
<?php $post=next($posts); ?>
<!-- <div class="tags"><?php echo $post->tags_out;?></div> -->
<div class="tertiaryheadline">
<a href="<?php echo $post->permalink; ?>"title="<?php echo $post-
>title; ?>"><?php echo $post->title_out; ?></a>
</div>
<div class="meta"><?php if ( $show_author ) { ?> <?php _e('af'); ?
> <?php echo $post->author->displayname; ?> <?php } ?></div>
<?php echo $post->content_out; ?>
<div class="meta-comments"><a href="<?php
echo $post->permalink; ?>#comments" title="<?php _e('Comments to this
post'); ?>"><?php echo $post->comments->approved->count; ?>
<?php echo _n( 'kommentar', 'kommentarer', $post->comments->approved-
>count ); ?></a></div>
</div>
<div class="tertiaryright">
<?php $post=next($posts); ?>
<!-- <div class="tags"><?php echo $post->tags_out;?></div> -->
<div class="tertiaryheadline">
<a href="<?php echo $post->permalink; ?>"title="<?php echo $post-
>title; ?>"><?php echo $post->title_out; ?></a>
</div>
<div class="meta"><?php if ( $show_author ) { ?> <?php _e('af'); ?>
<?php echo $post->author->displayname; ?> <?php } ?></div>
<?php echo $post->content_out; ?>
<div class="meta-comments"><a href="<?php echo $post->permalink; ?
>#comments" title="<?php _e('Comments to this post'); ?>"><?php echo
$post->comments->approved->count; ?>
<?php echo _n( 'kommentar', 'kommentarer', $post->comments->approved-
>count ); ?></a></div>
</div>
<div style="clear:both;"></div> <!-- Cheat to get parent div to
expand to encompass nested divs -->
</div>

<div id="quaternary">
<div class="quaternaryleft">
<?php $post=next($posts); ?>
<div class="quaternaryheadline">
<h2>Seneste artikler</h2>
<a href="<?php echo $post->permalink; ?>"title="<?php echo $post-
>title; ?>"><?php echo $post->title_out; ?></a>
</div>
<?php $post=next($posts); ?>
<div class="quaternaryheadline">
<a href="<?php echo $post->permalink; ?>"title="<?php echo $post-
>title; ?>"><?php echo $post->title_out; ?></a>
</div>
<?php $post=next($posts); ?>
<div class="quaternaryheadline">
<a href="<?php echo $post->permalink; ?>"title="<?php echo $post-
>title; ?>"><?php echo $post->title_out; ?></a>
</div>
<?php $post=next($posts); ?>
<div class="quaternaryheadline">
<a href="<?php echo $post->permalink; ?>"title="<?php echo $post-
>title; ?>"><?php echo $post->title_out; ?></a>
</div>
</div>
<div class="quaternaryright">
<div class="recentcomments">
<?php $theme->show_recentcomments(); ?>
</div>
</div>
<div style="clear:both;"></div> <!-- Cheat to get parent div to
expand to encompass nested divs -->
</div>


<!-- /home -->
<?php $theme->display ('footer'); ?>

Reply all
Reply to author
Forward
0 new messages