Slow down trackback spam with Simple Trackback Validation

I used the Simple Trackback Validation plugin for a while until I noticed these errors showing up in php_errors.

PHP Fatal error: Cannot instantiate non-existent class: snoopy in /home/www/wp-content/plugins/simple-trackback-validation/simple-trackback-validation.php on line 158

This morning I decided to fix it as the spammers have been going crazy. I spotted dozens of POST requests to trackbacks as I tailed my log files.

How to fix the plugin:

  1. Open simple-trackback-validation.php in a text editor and go to line 158. It should be this line:
    $stbvSnoopy = new Snoopy;

  2. Above that line, add the folloing line:
    include_once( ABSPATH . 'wp-includes/class-snoopy.php' );

  3. Save the file and upload to your host again.

It’s no substitute for Akismet but along with Cookies for comments it should help keep your blog spam free!

Or, as I’ve just done because this blog is being inundated with trackback spam right now (over 17,000 in the last 9 hours), I blocked off access completely with this rewrite rule. Any WordPress blog will send a pingback anyway and MT even supports pingback now!

RewriteRule ^(.*)/trackback/ - [F]


17 Comments

Thaya Kareeson (2 comments.) on April 3, 2008 at 8:29 am.

So this plugin was broken for a while? Do you remember when it broke? During WP 2.3.x or WP 2.5?

Reply

Pingback: Spam at alex.rabe

Stephen Cronin (7 comments.) on April 3, 2008 at 8:56 am.

It’s working fine for me in WP2.3.x. I’ve been swearing by this plugin for a while now, so it’s good to see it getting some exposure.

Reply

Thaya Kareeson (2 comments.) on April 3, 2008 at 9:06 am.

I might look into installing it on my blog then. I’m still on WP 2.3.3. The changes Donncha mentions is probably a WP 2.5 compatibility fix (right?).

Reply

Donncha (1707 comments.) on April 3, 2008 at 9:25 am.

I was testing 2.5 for a while so it probably is a 2.5 issue. Very useful plugin too!

Reply

Ken G (1 comments.) on April 3, 2008 at 2:23 pm.

Note that if you copy and paste the additional line directly from the above blog URL, you’ll get high-ASCII curly quotes that will result in this error message:

Parse error: syntax error, unexpected T_CLASS in /home/gagne2/public_html/showbits/wp-content/plugins/simple-trackback-validation.php on line 158

Reply

Donncha (1707 comments.) on April 3, 2008 at 2:33 pm.

Ken – thanks for commenting, I changed the apostrophes to html entities according to the Writing code in your posts Codex page. Looks like it’s copy/pastable again!

Reply

Kirk M (16 comments.) on April 3, 2008 at 9:01 pm.

Donncha,

I’ve actually had this problem with the Simple Trackback Validation plugin since I upgraded to WordPress 2.3 and finally got fed up and quit using it when the plugin’s author stated he hadn’t ever heard of it before. It doesn’t look like it’s even under development any longer.

Thanks for fix though. It’s much appreciated.

Reply

Ankur (1 comments.) on April 4, 2008 at 8:51 am.

I’m getting ~50,000 spam hits a day, so I’ll definitely be checking this out. Thanks.

Reply

Paul Spoerry (2 comments.) on April 4, 2008 at 12:53 pm.

I noticed Snoopy is not included as part of the plugin package. I also do not have Snoopy in /wp-includes/. I didn’t see any indication in the instructions that I needed to do so, but do I need to download and install Snoopy as well?

Reply

Donncha (1707 comments.) on April 4, 2008 at 1:02 pm.

Paul – the file is wp-includes/class-snoopy.php and I just checked a new 2.5 install and it’s there. Check again!

Reply

Paul Spoerry (2 comments.) on April 4, 2008 at 1:39 pm.

Wow! Must have been a 1D10T problem… disconnect between my seat and keyboard. The file is there… dunno how I missed it. Thanx!

Reply

btard (1 comments.) on April 5, 2008 at 9:47 pm.

Arg, I fixed this myself in a not too dissimilar way as a hack after seeing these in my error log. I have been so busy lately (recovery from LASIK on eyes etc) to release or announce this but I had planned and I am glad you did. Kudos.

Reply

Pingback: BloggingTom

duka (1 comments.) on December 15, 2008 at 10:52 am.

Thanks! Since I upgraded to WP2.7 I was suffering with this error in another plugin. It lacked the include line (but it worked till now, don’t now why). Now it works again.

Lot of thanks!

Reply

Leave Your Comment

Your email will not be published or shared. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


Holy Shmoly! is Stephen Fry proof thanks to caching by WP Super Cache