Page 1 of 1
How to Prevent Spam trackbacks
Posted: Tue Mar 06, 2007 5:17 pm
by PurpleCow
Hi,
I am getting more than 25 spam trackbacks every minute and this is causing a huge load on my shared hosting account and sometimes, my admin is suspending the hosting account.
How can i disable trackback
How can I delete all the existing trackbacks from the database?
Also, i can prevent spam trackback.
I am using 0.8.x version of serendipity.
Thank you for any quick help.
Cheers
Re: How to Prevent Spam trackbacks
Posted: Tue Mar 06, 2007 8:24 pm
by garvinhicking
Hi!
The only way to get low traffic is to edit your comment.php and insert this:
Code: Select all
if ($_REQUEST['type'] == 'trackback') die('Disabled');
after the first <?php.
How can I delete all the existing trackbacks from the database?
MySQL: DELETE * FROM serendipity_comments WHERE type = 'TRACKBACK';
Also, i can prevent spam trackback.
Yes, by using the spamblock event plugin. However if you use the PHP code from above, all trackbacks will be disabled.
I am using 0.8.x version of serendipity.
Your serendipity version might contain security issues, please read the 'Security' section on blog.s9y.org to see if you require an upgrade.
Best regards,
Garvin
Posted: Wed Mar 07, 2007 1:23 pm
by PurpleCow
Hi,
I tried to runt his query from my phpmyadmin,
DELETE * FROM serendipity_comments WHERE type = 'TRACKBACK';
But i get teh following error...
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* FROM serendipity_comments WHERE type = 'TRACKBACK'' at line 1
Any help greatly appreciated.
Thanks
Posted: Wed Mar 07, 2007 1:46 pm
by garvinhicking
Hi!
Oh, sorry. The query would need to read:
DELETE FROM serendipity_comments WHERE type = 'TRACKBACK';
Regards,
Garvin
Posted: Wed Mar 07, 2007 5:06 pm
by PurpleCow
gravin...
Looks like the new query worked.
But, I got the following warning message in my phpmyadmin when teh query was executed.
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/header_meta_style.inc.php:27) in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/common.lib.php on line 1154
I hope this warning is not going to cause any further problems to me.
Thank you for any help on that warning message.
Cheers
Posted: Wed Mar 07, 2007 6:46 pm
by garvinhicking
Hi!
Hm, might be an issue in the phpMyAdmin code, but shouldn't create any problems for you!
It's only a duplicate message - did you check if the comments table shrunk in size?
Regards,
Garvin
Posted: Thu Mar 08, 2007 4:11 am
by PurpleCow
gravin...
I did'nt take note of the table sizes before and after.
However when I checked my serendipity admin section for trackbacks, all the 800K spam tracks were removed. does this mean the db size also was adjusted?
Thanks
Posted: Thu Mar 08, 2007 10:15 am
by garvinhicking
Hi!
Yes, then this will have worked properly
Regards,
Garvin