Getting the Bad Behavior Extension to Work with MediaWiki 1.17
I recently updated my robotic lawn mower site running an old version of MediaWiki to the current (as of this writing) version 1.17.0. The wiki had been filled with a bunch of spam users so after cleaning that up I thought I would add in the trusty Bad Behavior extension to keep some of the bad guys away. Long story short: it didn’t work and despite much Googling I couldn’t find a current solution.
So for my own future reference and to help anyone else dealing with this, here is how I made it go.
- Grab the latest development version of Bad Behavior. Development has been stuck at version 2.1.13 due to a lack of donations so consider donating to the project if this is important to you. I donated a while back but it’s probably time for another one.
- Unpack the zip file and put the whole bad-behavior folder in your MediaWiki extensions directory.
- This version of Bad Behavior looks for a settings.ini file in its main directory to override settings. If the file is not there you will get array errors. So even if you don’t need to override settings at least create an empty file with that name.
- Bad Behavior requires a DatabaseFunctions.php file for some database compatibility functions. This outdated file is no longer included in MediaWiki 1.17.0. Download MediaWiki 1.16.5, which is the last version to include that file. Grab the DatabaseFunctions.php from the includes directory and put it in your current MediaWiki install’s includes directory.
-
Now ignore the Bad Behavior instructions and put this in your MediaWiki LocalSettings.php file:
include_once( "$IP/includes/DatabaseFunctions.php" );
include( "$IP/extensions/bad-behavior/bad-behavior-mediawiki.php" );
That should do it.


4 Responses to “Getting the Bad Behavior Extension to Work with MediaWiki 1.17”
Posted by: Death to Spackers! « Maps and Data and More - 07/25/2011
[...] Check for “bad behavior” using the fiendishly clever “bad behavior” extension. It didn’t want to install on mediawiki 1.17 — some of its favorite database functions had been deprecated and there was a settings.ini file it wished to question — but as so often a quick web troll uncovered the answer. [...]
Posted by: Swyter - 08/04/2011
Thank you!
Exactly what I was looking for!
Posted by: Varun Mehta - 12/31/2011
Thanks, that’s exactly the information I needed (about settings.ini). You saved me a TON of headache!
Posted by: Ralf - 05/05/2012
Thank you very much. It worked (I am using MediaWiki 1.18.3).
Leave a Reply of Your Own