How to get v6.x-1.0-rc2 to run on Drupal 6

Carlos Miranda Levy - April 3, 2009 - 16:47
Project:Bad Behavior
Version:6.x-1.0-rc2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Many have tried to explain it before, even myself. But now that two fixes are required to get the module working (and given the blessing this module is for sites targeted by spammers), I'll try to summarize both steps in a simple set of instructions...

  1. Download and Install module as Instructed.
  2. Download the latest bad-behavior code from http://www.bad-behavior.ioerror.us/download/ as instructed.
    • In order to make it easier for you, do not unzip it in sites/all/badbehavior...
    • Unzip it somewhere else.
    • This creates a "bad-behavior" folder, with several files in it... most likely:
      bad-behavior-generic.php bad-behavior-wordpress-admin.php index.html
      bad-behavior-lifetype.php bad-behavior-wordpress.php README.txt
      bad-behavior/ bad-behavior-mediawiki.php COPYING
    • Now, you don't want to copy that folder into your module folder.
    • Copy the contents (not the folder) of the resulting "bad-behavior" folder, including the bad-behavior-generic.php file and the "bad-behavior" folder within, to sites/all/modules/badbehavior.
      • That is... copy the contents of the folder, not the folder itself.
      • Notice that there is a sub-folder called bad-behavior in it.
      • You do want to copy the contents of the folder and the sub-folder into your badbehavior module folder.
    • As a result, the bad-behavior-generic.php file should be in the same folder as badbehavior.module, that is "sites/all/modules/badbehavior".
    • And there should be a "bad-behavior" sub-folder with several files under "sites/all/modules/badbehavior", so that "sites/all/modules/badbehavior/bad-behavior" has within it files such as:
      common_tests.inc.php index.html msie.inc.php safari.inc.php core.inc.php konqueror.inc.php msnbot.inc.php screener.inc.php
      banned.inc.php functions.inc.php lynx.inc.php opera.inc.php trackback.inc.php blackhole.inc.php  google.inc.php movabletype.inc.php  post.inc.php version.inc.php blacklist.inc.php housekeeping.inc.php mozilla.inc.php responses.inc.php  whitelist.inc.php
    • You can now delete the original unzipped bad-behavior folder.
    • You should now have on bad-behavior subfolder under the badbehavior module folder and that's it, no subfolder under the subfolder...
      sites/all/modules/badbehavior
      sites/all/modules/badbehavior/bad-behavior
  3. Edit the bb2_read_settings() function in badbehavior.module (around line 204) as suggested in this patch for v5.x
    remove the line:
        'strict' => variable_get('badbehavior_strict_checking_enable', 0),
    in its place, add:
        'logging' => 1,
        'strict' => variable_get('badbehavior_strict_mode_enable', 0),

You should be all set and able to see rejected requests and their ip's at "yoursite/admin/reports/badbehavior" (if clean url's are enabled).

In short, the above instructions represent the instructions below at shell level...

cd public_html/sites/all/modules
wget http://ftp.drupal.org/files/projects/badbehavior-6.x-1.0-rc2.tar.gz
tar
-zxvf badbehavior-6.x-1.0-rc2.tar.gz
wget http://downloads.wordpress.org/plugin/bad-behavior.2.0.25.zip
unzip
bad-behavior.2.0.25.zip
cp -r bad-behavior/* badbehavior
rm -rf bad-behavior

And for the edit of the badbehavior.module file:
pico badbehavior/badbehavior.module

Hope this helps others and saves them time (this is the 3rd time I have to sit down and go through the issues to figure out how to get this wonderful module to run properly).

#1

gregarios - November 19, 2009 - 03:48
Status:active» reviewed & tested by the community

These instructions work.

Tested and working in Drupal 6.14 with the bad-behavior.2.0.33.zip download.

#2

gregarios - November 19, 2009 - 03:48
Status:reviewed & tested by the community» needs review

I have a patch that should enable the module, after using the instructions found in this thread, to work with bad-behavior.2.0.33.zip, enabling the new Project Honey Pot (http:BL) functionality.

See this thread for some extra details: http://drupal.org/node/618482

Would someone please test it and report back? This patch is for version 6.x-1.0-rc2. It also incorporates the fix in #3 of the instructions in the first post of this thread.

AttachmentSize
badbehavior.module.patch 1.36 KB

#3

MrGeek - November 23, 2009 - 04:26

Thank you!
I was pulling out my hair after upgrading my D5 to D6 and not seeing anything in my BB logs.. The instructions above work perfectly.

 
 

Drupal is a registered trademark of Dries Buytaert.