Bad Behavior on PHP 5.2.0

January 26th, 2007 by Michael Hampton

I’ve gotten a couple of isolated reports from people using PHP 5.2.0 that Bad Behavior is failing to block anything on this version of PHP.

I don’t have access to any machines running this version of PHP (it’s far too new) so I haven’t yet been able to investigate the problem.

Until I can figure out what’s going on, I recommend downgrading to PHP 5.1.6, the latest version known to work. You can also use PHP 4, if your Web host gives you this option.

(Or, if you already happen to know what the problem is, please let me know.)


13 Responses to “Bad Behavior on PHP 5.2.0”

  1. 1

    Viper007Bond Says

    Yeah, 5.1.6 works fine here. Been using it for quite a while without any problems. :)

    Can’t speak to 5.2.0 though…

  2. 2

    Kelson Says

    FWIW, I haven’t had any problems with Bad Behavior on my PHP 5.2.0 installation. It’s running on Linux, with Apache 1.3 (I know, I know) and is called as an Apache module.

    I’ve had to make a couple of adjustments to WordPress’ own files, but the only changes I’ve made to BB were to add a couple of IPs to my whitelist (and more recently to add a certain bot that I emailed you about yesterday).

  3. 3

    David Says

    I’m using 5.2.0 and all seems ok to me.
    If you want access to a 5.2.0 install, let me know!

  4. 4

    Tero Says

    Hello Sirs,

    first your program is awesome if it really works, I am trying to install it to my phpbb board soon.

    :P hBad Behave 0.51BETA which is based on Bad Behavior 2.0.9
    http://www.phpbb.com/styles/forum/viewtopic.php?t=406036&postdays=0&postorder=asc&start=15&sid=3713ec5a861f6f77d208bb2089811f81

    Second:
    Does this program protect against website archiving programs and email collector programs like these:

    SetEnvIfNoCase User-Agent “HTTrack” bad_bot

    SetEnvIfNoCase User-Agent “Download Ninja 2.0″ bad_bot

    SetEnvIfNoCase User-Agent “JBH Agent 2.0″ bad_bot

    SetEnvIfNoCase User-Agent “EmailCollector/1.0″ spam_bot

    SetEnvIfNoCase User-Agent “EmailSiphon” spam_bot

    SetEnvIfNoCase User-Agent “EmailWolf 1.00″ spam_bot

    SetEnvIfNoCase User-Agent “ExtractorPro” spam_bot

    SetEnvIfNoCase User-Agent “Crescent Internet ToolPak HTTP OLE Control v.1.0″ spam_bot

    SetEnvIfNoCase User-Agent “Mozilla/2.0 (compatible; NEWT ActiveX; Win32)” spam_bot

    SetEnvIfNoCase User-Agent “CherryPicker/1.0″ spam_bot

    SetEnvIfNoCase User-Agent “CherryPickerSE/1.0″ spam_bot

    SetEnvIfNoCase User-Agent “CherryPickerElite/1.0″ spam_bot

    SetEnvIfNoCase User-Agent “NICErsPRO” spam_bot

    SetEnvIfNoCase User-Agent “WebBandit/2.1″ spam_bot

    SetEnvIfNoCase User-Agent “WebBandit/3.50″ spam_bot

    SetEnvIfNoCase User-Agent “webbandit/4.00.0″ spam_bot

    SetEnvIfNoCase User-Agent “WebEMailExtractor/1.0B” spam_bot

    SetEnvIfNoCase User-Agent “autoemailspider” spam_bot

  5. 5

    Michael Hampton Says

    This is completely off topic, but…

    That phpBB port has some potential problems which I’ll address directly with the author.

    As for your list of user agents, most of those are already blocked. Bad Behavior does NOT block the so-called “website archiving programs” such as HTTrack as many people actually want these to be able to access their site.

  6. 6

    Ped Xing Says

    I’m trying to use Bad Behavior on a MediaWiki 1.9.3 with PHP 5.2.1 (Dreamhost) and I get the following error:
    Fatal error: Call to undefined function wfquery() in [...]/extensions/Bad-Behavior/bad-behavior-mediawiki.php on line 63

    Looks like wfQuery is breaking for some reason… It’s used in lots of places in MediaWiki but doesn’t work here.

    Thanks!

  7. 7

    Ped Xing Says

    Looks like wfQuery is gone! You can fix the broken line 63 by replacing that line with these two:
    $dbr =& wfGetDB( DB_SLAVE );
    $bb2_last_query = $dbr->query($query) ;

    Ped Xing

  8. 8

    Mike Says

    Can I combine Akismet and Bad Behaviour on my blogs powered by WordPress?

  9. 9

    Nicesoftware Says

    Hello Sir,

    You have very nice software according to document. Does this work in pbpbb ?

    And where I could find that software which works in phpbb ?

  10. 10

    wobo Says

    In PunBB 1.2.15 a user reports getting the Bad Behavior response (Error 503) while trying to log in with Konqueror. He does not get it with Firefox or any other browser.
    I cannot reproduce this, his login/password is correct. It must be something in his setup which causes the error but we cannot find any unusual configuration. His case is the first one at a site which receives several K unique visitors per day.

    It would be helpful to know how Bad Behavior works…

  11. 11

    Eugen Says

    Thanks for the update, i got this error with an old version of wordpress and bad behavior. After the update of php and wordpress, the ping and trackbacks were broken. if the update of bad behavior it works fine. thanks for the great work.

  12. 12

    HangingCurve Says

    Does this work on BBlog?

  1. 1

    Bad Behavior / Bad Behaviour: Bad Behavior 2.0.10