Bad Behavior 2.0.10
January 27th, 2007 by Michael Hampton
Bad Behavior 2.0.10 has been released. It is a maintenance/bug fix release.
Who should upgrade?
This is an optional upgrade for those of you already running version 2.0.9. If you are running an older version, please update as soon as possible.
This is a critical upgrade for those of you who are using PHP 5.2.0 or later versions.
What’s new?
Bad Behavior 2.0.10 fixed a bug which caused a failure to block any spam on sites using PHP 5.2.0 or later.
Download
Bad Behavior 2.0.10 may be obtained from the download page.

Viper007Bond Says
So out of curiosity, what was wrong?
Jan 27th, 2007 at 12:58 pm
Michael Hampton Says
Oh, I guess I didn’t actually say.
One bit of code in the whitelist code did some funny math that happened to work on 5.1.6 and prior versions, but not in 5.2.0 and later.
Rather than try to figure out if it was a bug in my code or a bug in PHP, I just rewrote the function.
Jan 27th, 2007 at 2:01 pm
Jeff Says
I’m running WordPress 2.0.7 on PHP 5.2.0. I just upgraded from Bad Behavior 2.0.9 to 2.0.10. When I loaded my blog after the upgrade, I got an error message at the top of the front page: “Warning: Cannot modify header information – headers already sent by (output started at [path to blog -Ed.]/wp-content/plugins/Bad-Behavior/bad-behavior/version.inc.php:7) in [path to blog -Ed.]/wp-content/plugins/Bad-Behavior/bad-behavior/screener.inc.php on line 15″
(In the above error message, I edited out the full path to my blog.) I downgraded to 2.0.9, and the warning message went away.
Jan 27th, 2007 at 2:10 pm
Michael Hampton Says
Jeff, there are only three lines in the version.inc.php file, so I suspect you didn’t unpack it correctly, or you uploaded it incorrectly, or something of that nature.
Jan 27th, 2007 at 2:27 pm
Jeff Says
Michael, thanks for the response. I don’t know whether it could be the cause of the problem, but I noticed something strange with the line endings. I was looking at version.inc.php with a hex editor, and other than the version number (2.0.9 vs. 2.0.10), the only difference was the line endings. In 2.0.9 they were CR LF. In 2.0.10 they were CR CR LF. I tried downloading 2.0.10 again, and this time they were just LF. I haven’t tried installing the LF-only download on my blog yet.
Jan 27th, 2007 at 3:58 pm
Michael Hampton Says
This line-ending thing screws with everyone sooner or later. There’s no really good solution to it, except to eradicate Microsoft from the face of the earth.
Future releases of Bad Behavior will use .tar.gz format, which should hopefully eliminate the problem for most people. (And a few Windows users will have to download something to unpack it…)
Jan 27th, 2007 at 4:07 pm
Jeff Says
Ok, I uploaded the LF-only version, and it seems to be working now, so I guess that was the issue. Did you change the distribution at all, or was it just a fluke of downloading?
Jan 27th, 2007 at 5:40 pm
Sgt. Shaftoe Says
Does anything need to be modified on WP-Cache so that Bad Behavior and WP-Cache play well together? The doc seems to infer that but I can’t find any additional info on it…
Jan 31st, 2007 at 4:38 am
Michael Hampton Says
Yes, it does. That’s one of the pieces of documentation I haven’t yet transferred over to the new site. You can find it in the instructions for WordPress on the old site.
Jan 31st, 2007 at 10:04 am
Sgt. Shaftoe Says
Trying to find the documentation you’re referring to on the old site, and I am coming up empty… I’ve even used Google to search just error.wordpress.com and still nothing. Could you do me the favor of pointing to the link which explains the modifications necessary to use Bad Behavior in conjunction with WP-Cache? Thanks in advance.
Jan 31st, 2007 at 11:31 pm
Michael Hampton Says
Sure, I can do that.
Feb 1st, 2007 at 12:07 am
skcsknathan001 Says
I just started to use Bad Behavior, but I’m wondering does it actually blocks spams at the very beginning. I mean should I need to manually add some domains in the .htaccess even after running Bad Behavior?
If I add the following, would it be I’m doing duplicate work?
SetEnvIfNoCase Referer dating.blogs.com spammer=yes
SetEnvIfNoCase Referer online-casino-pops spammer=yes
SetEnvIfNoCase Referer 8thstreetlatinas spammer=yes
SetEnvIfNoCase Referer boysfirsttime spammer=yes
SetEnvIfNoCase Referer gofordgo spammer=yes
SetEnvIfNoCase Referer buy-hgh-human-growth-hormone spammer=yes
Order allow,deny
allow from all
deny from env=spammer
# added to Deny Access to No Referrer Requests
# http://codex.wordpress.org/Combating_Comment_Spam/Denying_Access
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*adadaa.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
Thanks
Feb 8th, 2007 at 4:21 pm
gmorehou Says
Upon upgrading to 1.9.2, enabling Bad Behavior causes the following error when loading a wiki page:
Fatal error: Call to undefined function: wfquery() in /home/[snipped path]/extensions/Bad-Behavior/bad-behavior-mediawiki.php on line 63
I notice there are a couple comments on your BB blog about this as well. I’m on Dreamhost which hasn’t upgraded to PHP 5.2 yet.
Special:Version reports:
* MediaWiki: 1.9.2
* PHP: 5.1.2 (cgi-fcgi)
* MySQL: 4.1.14-Debian_5-log
Thanks for your efforts in developing the plugin.
Feb 9th, 2007 at 11:40 pm
Michael Hampton Says
That function should be wfQuery(), not wfquery(), at least the last time I looked. It appears to be correct in the original distribution files.
Feb 10th, 2007 at 12:12 am
Richard Blair Says
Thanks for a great plugin – I’ve had issues with visitors exhibiting “bad behavior” on my WP 2.1 site (harrasing comments from behind an anonymous proxy). After I installed Bad Behavior, I went to one of the anonymous web based proxies, and sure enough, when I tried to comment the “blocked” screen came up. However…
When I went back to the site, the comment was posted anyway.
Any ideas?
Feb 10th, 2007 at 11:36 pm
Brian Hartvigsen Says
Yeah it’s not working on mediawiki 1.9.2. If you add require_once( ‘DatabaseFunctions.php’ ); then it will work, however the edit page is a little screwed up, labels end up beneath thier checkboxes and the like. Disabling Bad Behavior causes the edit page to be rendered correctly so I’m guessing it’s something Bad Behavior is doing.
Feb 13th, 2007 at 6:44 pm
Russ Says
Just wanted to drop you a note; couldn’t quickly find a “contact me” link or an email or sommat. So … Anyway; I was playing with this site ( it’s not mine ): http://bethebot.indyanow.com/ , and I put in a bad bahaviour protected url, and the preview didn’t work. Nifty. I could disable Bad Behavior for the 3 minutes it would take to look at the site, just wanted to draw your attention to it.
No big deal; feel free to delete this comment.
Feb 15th, 2007 at 5:13 pm
Oliver Georgi Says
When using IE7 and your visitors are always blocked by Bad Behavior check file “blacklist.inc.php” (around) line 53.
There you can find:
“compatible-”, // misc comment/email spam
change it to (just put // in front of the line):
//”compatible-”, // misc comment/email spam
Feb 19th, 2007 at 4:27 pm
TechZ Says
One of the more consistently “no nonsense” and “works as easily as it’s updated” plugins ever.
Thanks.
Feb 24th, 2007 at 9:09 pm
ParanoiaIsHealthyButTiring Says
This is a good plugin to WordPress (et.al.), as it might protect our site against a few targeted attacks. Most commenting and forms and pings and such are disabled allready, but we could still be targets of XSS or automated login attempts or other nuisances. We thus appreciate this plugin a lot.
There are two things, that might need a little bit of improvement, though:
1) A log viewer would be of great value. Auditing Bad Behaviour by reading the database with phpMyAdmin and comparing the “keys” to the descriptions found in the responses.inc.php is tedious. I understand that something like this is planned. I can’t pay for it, so I’ll stop whining now
for a moment.
2) Bad Behaviour violates our privacy policy
by reporting the visitors ip addresses to a third party (as it tries to identify spammer ips from some list/service). Many users value and need this. In a less relaxed security environment (ours) this can be considered as a critical information leak. I know. I know. Bad Behaviour is good. But our privacy policy states that nothing will be sent to a third party. Ever. No BlackHole tests. No external JS. No external images. No external anything. As a webmaster only, I can do nothing about this. So, a humble request: Would it be possible to offer these lists for download/local use (without compromizing their usefullness)? Or possibly let us enable/disable “ip verification from remote list” in the settings?
Feb 27th, 2007 at 10:25 pm
ParanoiaIsHealthyButTiring Says
I allready commented out all the remote ip tests, so now the scripts comply to our policy (at a cost — reduced efficiency). Hacking source code is not my favorite pursuit, though. It causes administrative overhead and complicates plugin upgrades.
I want to say this once more: There is nothing suspicious about Bad Behaviour, and I like it quite a lot actually.
Feb 27th, 2007 at 10:37 pm
Elaine Vigneault Says
Just a question about Bad Bahavior:
Does it block scraper bots too? If so, that’s a great feature you might want to publicize a bit.
Mar 3rd, 2007 at 4:59 pm
Germán Says
Hi,
until yesterday night, I never had comments to delete filtered by Akismet plugin, because I was using also Bad Behavior 2.10.
But today I got a lot of spam (again) that catch Akismet…. it seems like Bad Behavior can’t detect the spam… it’s very strange.
Since yesterday I also modified robots.txt by adding these lines:
# The Googlebot is the main search bot for google
User-agent: Googlebot
# The Googlebot-Image is the image bot for google
User-agent: Googlebot-Image
# This is the ad bot for google
User-agent: Mediapartners-Google*
Could be that the cause of the new spam not filtered for Bad Behaviour?
Thank you.
Mar 7th, 2007 at 3:02 pm
Ped Xing Says
I was also having problems with Bad Behavior on Dreamhost and replaced line 63 with these two:
$dbr =& wfGetDB( DB_SLAVE );
$bb2_last_query = $dbr->query($query) ;
This makes it work, but I’m not sure if this is the correct “solution”…
Stephen
Mar 8th, 2007 at 8:56 pm
Ambriel Says
Database support for Bad Behavior generic implementations.
For those of you who love Bad Behavior 2, you will be very please to know about an awesome new generic implementation for Bad Behavior 2 which adds ADODB database support to Bad Behavior generic, and also downloadable separate is an override module which expounds and adds powerful new features. The override module can be used with any of the implementations (ie Wordpress, Generic .. Etc)
Please visit to download free of charge.
http://www.ambriels.net/entry/
Mar 11th, 2007 at 3:44 am
Mattias Wirf Says
Hi!
What license does this script use? I tried to find this information in the download but couldn´t.
The reason I ask is that I develop a free (LGPL) image gallery in PHP and want to know if you distribute Bad Behavior as a plugin in the download of the gallery-script?
Maybe this is a question for your FAQ also?
/ Mattias Wirf
Mar 21st, 2007 at 11:13 am
Mattias Wirf Says
Sorry, wrong words in previous comment – ofcourse I meant “…and want to know if I can distribute Bad Behavior as a plugin…”.
Mar 21st, 2007 at 11:20 am
Mattias Wirf Says
Hi again
Sorry for my third post, but I found the answer to my question in the php-file…. should have thought of that.
Mar 21st, 2007 at 4:52 pm
Fred Says
I installed Bad Behaviour correctly, but a lot of comment spam is continuing to get through to my Wordpress blog. It worked great for the first 2 days, until a new wave of spam started getting through.
I have both Verbose HTTP request logging and Strict checking checked, but it doesn’t seem to be making much of a difference.
Mar 22nd, 2007 at 3:53 pm
Johan Says
It may be that I’m missing something very obvious here, but where can I read more on installning Bad Behaviour? “Read More on Installing Bad Behavior »” on the front page is no link. The read me-file directs just tells the reader to go here. I have unsuccessfully searched the blog archive.
//JJ
Mar 23rd, 2007 at 6:38 pm
Johan Says
Nevermind. Solved it.
//JJ
Mar 24th, 2007 at 4:23 pm
Andrew Ian Dodge Says
I have this odd problem that my authors and I are getting banned from commenting. Is there any reason why I am banned from commenting on my own blog? Does this update fix things?
Mar 29th, 2007 at 10:47 am
Götz Says
It would be nice if someone could add a block against the “rgergerger” script. If you don’t know just google for it ot have a look at my posting here: http://support.pn-cms.de/module-CMS_Support_Forum-viewtopic-topic-26334.htm where you can see how an entry looks like that doesn’t get filtered by BadBehaviour
Mar 29th, 2007 at 3:49 pm
Ron Says
I’ve applied Oliver Georgi’s fix above because I’m finding BB now locks out IE6 users as well.
Mar 30th, 2007 at 3:29 am
rtil Says
Ped Xing – it makes the error go away but I’m not sure it solves everything as i went to check the bad behavior block list on the special pages and i received a fatal error on line 65, line 2 of yours.
Mar 31st, 2007 at 5:28 pm
Nicki Says
I’m sorry if this has been asked before, I did not see it covered in the FAQ or dox: How do you know if BB is already set to block a particular bot? The reason I ask is because OpenISearch’s bot (formerly SMBot I believe) has been slamming my site over the last week or so. I did not have it whitelisted, so I ended up banning via HTACCESS files.
Sorry, I don’t have any logs; but if you need more info, here’s what I found while looking up this bot: http://www.hybrid6.com/webgeek/2007/02/openisearch-is-even-worse-than-smbot.php
Apr 2nd, 2007 at 1:05 pm
Dan Says
Can Bad Behaviour be used with Yabb 2.1?
Apr 6th, 2007 at 9:00 pm
Ped Xing Says
Suddenly getting spam again on three different mediawikis as of yesterday. These are typical random-character account names and random deletions of content. I’m assuming they were trying to probe to see if they could get in…
So I think Bad Behavior has a hole!
Apr 11th, 2007 at 4:11 am
Will Says
Does anyone know if there are there still problems running BB if GoDaddy is hosting your site?
Apr 19th, 2007 at 3:38 pm
LcF Says
getting following error after running BB 2 for a day:
Any clue?
Apr 22nd, 2007 at 8:32 am
mokiejovis Says
Have you considered any sort of integration of service for Project Honeypot (or at least making it easier for users to customize the banned page)? I LOVE how well Bad Behavior works, but I also enjoy contributing to Project Honeypot (http://www.projecthoneypot.org/). If I’m killing the spambots before they even get a chance to click the links then I’m not being a very good contributor.
I altered banned.inc.php in version 2.0.10, and I hope that’s working, but I’d love to be able to actually see what a banned visitor sees and be able to alter it more easily.
Apr 23rd, 2007 at 3:35 pm
Richard Hearne Says
I am experiencing a very sharp increase in spambot access since upgrading from an older version of BB (not sure what version TBH but it dates from perhaps October last year). After upgrading to 2.0.1 my spam count has increased exponentially, and the referrer spam levels have also spiked higher.
Was something loosened in 2.0.1? I have a sneaky feeling server is running php5.2 but will have to check and revert.
Rgds
Richard
Apr 24th, 2007 at 6:19 am
Rich Tatum Says
For some reason, I can no longer find my Bad Behavior reports page where I can delete and moderate spam entries and see what the results of the BB analysis is. I’ve looked all over for it to no avail. I have the BB options page under options > Bad Behavior, but nothing else.
I’m running:
WP 2.1.2
Linux
PHP 5.0.5
MySQL 4.1.21-standard-log
Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b
Any ideas? Is this due to an older version of PHP?
Apr 25th, 2007 at 9:58 am
Rich Tatum Says
Update to comment 1705: I deactivated all my plugins and reactivated only Bad Behavior. It still doesn’t show up in my Dashboard — except for the Options > Bad Behavior page.
Still no clue what’s going on.
Any ideas?
Apr 26th, 2007 at 11:01 am
Michael Hampton Says
Rich, I have no idea what you’re talking about. No such page exists, as far as I know.
Apr 26th, 2007 at 5:21 pm
Rich Tatum Says
Sorry, I think I’m remembering Spam Karma’s page.
:: sigh ::
Too many plugins!
Rich.
BlogRodent
May 6th, 2007 at 8:46 am
Nelson Cardoso Says
Does anyone know of any instructions on how to setup logging for a home grown php/mysql forum? I don’t use one of the pre-built systems. I just installed Bad Bahaviour and I would love to use the database stuff but I can’t find any instructions. Thanks a million.
May 14th, 2007 at 2:08 pm
Nelson Cardoso Says
Does anyone know of any instructions on how to setup logging for a home grown php/mysql forum? I don’t use one of the pre-built systems. I just installed Bad Bahaviour and I would love to use the database stuff but I can’t find any instructions. Thanks a million.
May 14th, 2007 at 2:11 pm
Laurence Says
First, I want to say thank you for your excellent Bad Behavior script! I only wish I could get it working properly. I don’t use wordpress but I want my site to be protected by Bad Behavior and cannot live without the detailed logs so I installed Wordpress 2.2 and Bad Behavior 2.1.0. I then made it so every page in my site accesses the bad behavior script by editing my .htaccess file and adding “php_value auto_append_file /var/www/html/blog/wp-content/plugins/Bad-Behavior/bad-behavior-wordpress.phpâ€.
All seemed well until I realized every php page I called outside of wordpress had the text “No Cheating!â€.
It seems its coming from the bad-behavior-wordpress.php file line 39: “if (!defined(’ABSPATH’)) die(â€No cheating!â€);â€
Could you tell me how I can get BB to work on all pages of my site while still maintaining the detailed logs?
Thanks,
Laurence
May 20th, 2007 at 5:22 am
Jim Says
I have Web sites that have blogs, and that I host on servers managed by hosting companies. I administer those Web sites using Microsoft’s FrontPage. I am not the admin for the servers, themselves. Can I upload Bad Behavior to just my Web sites, and employ it to protect my Web sites?
May 29th, 2007 at 8:16 pm
Matthew Martin Says
Microsoft live writer aka “Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Windows Live Writer 1.0)”
Can’t get past bad behavior. This is the offending line of code:
file: msie.inc.php
if (!array_key_exists(‘Accept’, $package['headers_mixed'])) {
return “17566707″;
}
I commented out the return, but I suspect there is a more elegant solution.
Jun 2nd, 2007 at 1:34 am
shane Says
I have a couple of quick questions. I am being hosted on powweb.com I read on an old blog post that bad behavior will not work with that host. Can you tell me why so that i can try and persuade them to change things?
I am trying to use BB on that host and its not working, but I could really use its features as my host is complaining about me using too much cpu time on the mysql server (comment spam mostly).
Any help would be very much welcome.
Jun 15th, 2007 at 4:19 am
Jonathan Says
Hi Michael,
First, thanks for BB. It’s been on my blogs for a year or two now, and works well.
A couple of questions:
1) I’ve been reading reports that BB can put a very heavy load on the mySQL server. Some hosts won’t allow BB to be installed for this reason. I’ve read that this has been brought to your attention and the comment was that “he’s doing nothing about it”.
I’d like to know if you are aware of this issue and what you’re doing to address it.
2) The latest version of Windows Live Writer is blocked by BB. Are you aware of this? The only solution I’ve found so far is to my IP address into the whitelist on BB. Of course, whenever my IP changes I have to add a new address to the whitelist. Are you able to change something in BB so that it does not block WLW? Seems like a necessary fix to me, as many BB users may also be WLW users.
(Will your reply to this message go to my email? Please send it to my email if it does not. Thanks)
With my regards,
Jonathan
Jul 10th, 2007 at 10:32 pm
SEO Mexico Says
Hello Michael,
I see that you’ve had a long success story with this great plugin. I have some problems with spam bots, but I am sure that after installing your plugin in my blog they will be rejected with an ass kick.
Just reading the comments I see that you really have an incredible support for the community, Congrats!
Jul 14th, 2007 at 7:14 pm
leon guanajuato mexico Says
Hi,
I’ve just installed my blog and I want to be protected against malicious bots, I’ll try ur bad behaviour wordpress plugin. I am using WordPress 2.2.1. and I hope it works fine.
Regards.
Jul 17th, 2007 at 1:47 am
FFMG Says
Hi,
Thanks for a great tool, I have added it to my blog host site, and it works flawlessly.
A few hundred bad guys have already been kicked out
.
Thanks again.
Jul 30th, 2007 at 10:28 am
FFMG Says
Hi,
I just noticed a small problem with 2.0.10.
Header from the Windows Live Writer are causing the user to get rejected.
I am not sure if this is a problem with all XML RPC(RSD) connections.
Let me know if you need some headers to investigate.
Regards,
FFMG
Jul 31st, 2007 at 7:34 am
Puk Says
Installed this on my new site i’m building, but with my custom theme on wordpress i can’t seem to get the stats to sit well in my footer, ie, with my custom footer they dissapear completely, if i remove my footer then they randomly sit at the bottom of my screen and wordpress’s default footer comes back. I’ve tried altering the plugin directly with my class info for my footer etc but then the wordpress default footer still sits there. Is there anyway i can “call” the stats into my own custom footer, what code would i need? My php isn’t that good i will be first to admit. A helping had would be really swell! I’ve searched your sites to no avail on how to call it
Aug 14th, 2007 at 9:05 pm
Dan Says
Just wanted to take a moment to thank you for your work on this plug-in. Useful, valuable and headache free…it’s great.
Cheers,
Dan
Aug 18th, 2007 at 1:05 pm
Tester Says
Stopping Proxies.
BB2.0.10 stops some proxies but some do get through:
http://www.dzzt.com/nph-12.cgi/010110A/http/www.bad-behavior.ioerror.us/2007/01/27/bad-behavior-2010/
http://stealthclick.com/phproxy/index.php?go=http%3A%2F%2Fwww.bad-behavior.ioerror.us%2F2007%2F01%2F27%2Fbad-behavior-2010%2F&proxy=0&Submit=Go%21
http://www.anonoxy.com/cgiproxy/nph-proxy.pl/010110A/http/www.bad-behavior.ioerror.us/2007/01/27/bad-behavior-2010/
http://myspace–proxy.com/nph-proxy.cgi/010110A/http/www.bad-behavior.ioerror.us/2007/01/27/bad-behavior-2010/
Looking at the above urls I can see your hard work with ads from some vermin on web pages.
Aug 18th, 2007 at 10:37 pm
William Teach Says
Hey, I am wondering, is there a way of speeding up commenting when using Bad Behavior? Love the plugin, but it slows them down quite a bit, which I have noticed on several sites using it, and this is the best spam fighting plugin.
Aug 19th, 2007 at 7:08 pm
A Samuel Says
Dear Michael,
I would like to add the following robot: TKRobot to my white list, as it’s an important newsbot for us. Is this possible and where and what exactly in the code do I add?
The IP addresses to make our robots an exception from these are as follows: -
Live Robots: 81.93.164.146
Config: 81.93.165.4
Can you help please?
Aug 30th, 2007 at 1:41 pm
Aditya Kher Says
hi, I have been using BadBehavior ported to Nucleus CMS by Frank Truscot (). He directed me to you folks.
I get PHP “Headers already sent” error.
I narrowed it down to this function call:
Line 60 Screener.inc.php :
—
bb2_screener_cookie($settings, $package, BB2_COOKIE, $cookie_value);
—
If I comment this line, the warning goes away.
any ideas as to reason why this happens? How does commenting this line will affect the plugin’s ability to fight spam?
cheers
Sep 2nd, 2007 at 3:06 am
Hans Fredrik Nordhaug Says
It seems your e-mail address – badbots at ioerror dot us – doesn’t work:
Sent
Received >>> 599 5.1.1 error: invalid recipient: badbots@underground
The same error if I tried “error” as localpart.
Sep 2nd, 2007 at 9:45 pm
Dave Arrowsmith Says
Hi Michael;
I don’t know if you are interested but I edited some code for BB to allow Options for setting Log Entry LifeSpan, I will post it if you wish.
I’ll try here but am unsure at it’s display….
Files Edited to make Log Life Settings Dynamic
/plugins/Bad-Behavior/bad-behavior/admin.inc.php at New Line:42~
// Added Lines to make Log Days-to-Live Settings Dynamic
if ($_POST['log_life']){
if (ctype_digit(trim($_POST['log_life']))){
$settings['log_life'] = $_POST['log_life'];
}
}
// End Added Lines
and then at New Line:66~
” size=”4″ /> Recommended:7 (days)’); ?>
/plugins/Bad-Behavior/bad-behavior-wordpress.php
in bb2_read_settings function Add , ‘log_life’ => 7 to array defaults
//– Line Edited to make Log Life Settings Dynamic
return array_merge(array(‘log_table’ => $wpdb->prefix . ‘bad_behavior’, ‘display_stats’ => true, ’strict’ => false, ‘verbose’ => false, ‘log_life’ => 7), $settings);
in function bb2_insert_stats function edit line
//– Line Edited to display Dynamic Log Statistics
echo sprintf(‘%1$s %2$s %3$s %4$s’, __(‘Bad Behavior’), __(‘has blocked’), $blocked[0]["COUNT(*)"], __(‘access attempts in the last ‘$settings['log_life']‘days.’));
/plugins/Bad-Behavior/bad-behavior/housekeeping.inc.php Line:6~
// Line Edited to make Log Life Settings Dynamic
$query = “DELETE FROM `” . $settings['log_table'] . “` WHERE `date`
Sep 6th, 2007 at 1:28 am
Sy Ali Says
It’d be nice if this worked with the latest MediaWiki. When enabled, all pages in the wiki display a blank page.
I see no documentation which details what could be wrong. Bad Behavior would work perfectly on my previous version of MediaWiki but now it’s b0rked.
Sep 9th, 2007 at 1:47 am
Switzerland Says
Thanx a ton for this awesome plugin !
Sep 11th, 2007 at 8:02 am
Sy Ali Says
Enabling bad behavior just shows blank pages on mediawiki. The solution is to add this:
require_once( “$IP/includes/DatabaseFunctions.php” );
to bad-behavior-mediawiki.php
Sep 11th, 2007 at 7:12 pm
Sven Says
Thanks!
This is a great add on to any website.
Is there any good instruction on how to implement database support in BB generic?
Thanks again
Sep 11th, 2007 at 8:25 pm
brov Says
FEATURE REQUEST:
I’d like to see a page with BB log. Blocked requests with ip, time, headers and the reason. At least on BB for WordPress.
My two cents
Sep 19th, 2007 at 10:44 pm
FurrTrap Says
It appears the BB 2.0.10 and WordPress 2.2.3 don’t get on too well in my server environment. BB blocks my server IP address for all attempts to get wp-cron.php. The HTTP return codes are 200, but my server IP is listed in the BB database table.
Any ideas what’s happening and how to fix it up?
Thanks.
Sep 20th, 2007 at 6:50 pm
Phil J Leitch Says
I am having trouble with BB v2.0.10 and MW v1.11.0.
Is this line correct to add to localsettings.php ?
include( ‘./extensions/Bad-Behavior/bad-behavior-mediawiki.php’ );
In the BB file I downloaded the bad-behavior-mediawiki.php file is located outside of the Bad-Behavior directory?
Thanks.
Sep 23rd, 2007 at 7:32 pm
Web Maestro Says
I’m having trouble with Bad Behavior 2.0.10 and WordPressMU v 1.2.1. When Bad Behavior is enabled, all access to /wp-admin/ is blocked (although the blog front-end appears to run normally).
I tried fixing the problem by upgrading to wordpress-mu-1.2.5a, but it didn’t help (FWIW, I ended up downgrading back to 1.2.1 to return to a previous version of WordPress that I know ‘worked’, and haven’t re-upgraded, so we’re temporarily back at WPMU-1.2.1).
As far as I am aware, my sys ops have assured me that no changes to the server occurred, which would have resulted in this problem. That said, the firewall was upgraded, but I am assured that no outbound access is affected. But we have 100s of other servers behind that firewall which have not been adversely affected.
Removing Bad Behavior from the /wp-content/mu-plugins/ folder restores WP-Admin access. Moving it to /wp-content/plugins/ and activating it in a bog by blog basis also causes /wp-admin/ access to fail for those blogs which have it enabled.
Any ideas?
Here’re some specs
PHP: 5.2.0
Zend Engine v2.2.0
httpd: 1.3.37 (Unix)
mysql: 5.2.7
SunOS 5.10 Generic_118855-19 i86pc i386 i86pc
Sep 24th, 2007 at 4:39 pm
Jim Says
Yeah, Bad Behavior 2.0.10 is suddenly behaving very badly. It started, by my reckoning, a couple of days ago. I finally had to deactivate it on all my WordPress installations because it seemed to be blocking most php functions as they relate to talking to the database.
Sep 24th, 2007 at 7:22 pm
Noyb Says
Might be an idea to put out a new minor release of Bad Behavior – the way hooks work has changed in MediaWiki 1.11, so Bad Behavior needs to be updated (it’s not currently working with 1.11).
Sep 29th, 2007 at 9:29 pm
FurrTrap Says
I’ve stopped the wp-cron.php blocks by whitelisting my server IP address to bad behavior. No more wp-cron entries in the BB table.
All looks OK now.
Oct 4th, 2007 at 7:33 pm
Hilary Says
Hi there. I have been using Bad Behavior for quite some time now. I have had the latest version installed since it was released and had no problems until a few weeks ago. Suddenly, my my dashboard began taking about 30 seconds to load, publishing posts took about 15 seconds, and commenting also took a while. I disabled all of my plugins then re-enabled them one by one until the lag went away. Unfortunately, it was Bad Behavior that caused the lag.
Any ideas on why? Or what I can do? I’d like to continue using it. Thanks!
Oct 10th, 2007 at 6:31 pm
Jim Says
Looks like this project has been abandoned?!?
Bummer…
Oct 25th, 2007 at 1:45 am
David Russell Says
Is this version compatible with the new WP-Super Cache?
Nov 10th, 2007 at 7:57 pm