There are two folders Bad-Behavior/bad-behavior, if i use it as is or use the lower case folder, the error message still appears, which folder should we be placing inside the module folder ?

CommentFileSizeAuthor
#12 badbehavior.266120.patch1.35 KBsutharsan

Comments

vm’s picture

does the errror message show the module with a hyphen ?

darumaki’s picture

The message reads - Bad Behavior directory not found,

It can be confusing when you have a folder within a folder that is both same names, sometimes, instructions want you to remove the folder inside while others want you to put the whole thing, I wasn't sure based on the instructions. The module does appear to be installed.

tomceek’s picture

I can confirm that module is not working. tried different ways to solve the problem that "Bad Behavior directory not found"

calbasi’s picture

Version: 5.x-2.0-beta1 » 6.x-1.0-rc2
Component: Documentation » Miscellaneous
Status: Active » Fixed

Hi!

I've got the same problem and I think it's because of unclear install instructions of zip file.

Ok, when you unzip the .zip file you get a Bad-Behavoir directory. The mistalke is copy it in .../modules/badbehavoir directory.

The right way is copying THE CONTENTS of Bad-Behavoir directory in .../modules/badbehavoir dir...

The final (and succesfully) structure is:

.../modules/badbehavoir
- file1
- file 2
-...
- file n
- subdirectoy bad-bahavoir (yes! the one in lowercase letters!)
--- file a
--- file b
--- ...
--- file n

Regards,

calbasi

darumaki’s picture

I tried that too but still receive the directory not found message

perusio’s picture

Hello,

I'm using the 5.x version, but I got the same problem. Yes the README is rather thin.

The instructions for getting the badbehaviour module to work properly are, quoting from the README:

Installation
------------

1. Extract the tarball into the modules folder of your Drupal install.

2. Download BadBehavior 2.0.16 from
http://www.ioerror.us/software/bad-behavior/bad-behavior-download/,

Unzip the archive. You should have a directory 'bad-behavior' under the Bad-Behavior
top directory:

In my case:

  /home/appa/drupal.d/drupal-actual.d/spam.d/Bad-Behavior:
  total used in directory 72 available 648816
  drwxr-xr-x 3 appa appa  4096 2008-06-23 02:37 .
  drwxr-xr-x 3 appa appa  4096 2008-06-23 02:32 ..
  drwxr-xr-x 2 appa appa  4096 2008-06-23 02:37 bad-behavior  <-- this is the directory to copy
  -rw-rw-r-- 1 appa appa   4522 2008-04-21 18:41 bad-behavior-generic.php
  -rw-rw-r-- 1 appa appa   4544 2008-04-21 18:41 bad-behavior-lifetype.php
  -rw-rw-r-- 1 appa appa   4794 2008-04-21 18:41 bad-behavior-mediawiki.php
  -rw-rw-r-- 1 appa appa   5661 2008-05-18 01:47 bad-behavior-wordpress.php
  -rw-rw-r-- 1 appa appa 18326 2008-04-21 18:38 COPYING
  -rw-rw-r-- 1 appa appa   0 2008-04-21 18:38 index.html
  -rw-rw-r-- 1 appa appa   4690 2008-05-18 01:47 README.txt

copy the resulting bad-behavior directory into the modules/badbehavior folder.

So the final structure will be:

        sites/all/modules/badbehavior:
                    bad-behavior <-- bad-behaviour PHP scripts dir
                    badbehavior.info
                    badbehavior.install
                    badbehavior.module
 

3. Enable the module as usual from the Drupal admin>>modules page.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

Carlos Miranda Levy’s picture

Status: Closed (fixed) » Active

----

Carlos Miranda Levy’s picture

Version: 6.x-1.0-rc2 » 5.x-2.0-beta1

---

Carlos Miranda Levy’s picture

Followed the instructions and doesn't work.
It matters not if you download latest version or version 2.0.13 of BadBehavior.
I copied the bad-behavior folder from Bad-Behavior to sites/all/modules/badbehavior so that it ended up like sites/all/modules/badbehavior/bad-behavior but no luck.

Once you get the first error at install time you don't get any other errors, but I found out it was not ok as I continued to get the same error of bad-behavior folder missing when I tried to enable the module in my other sites of my multisite installation.

Oddly enough, the module does work as you can see the module's log to fill with blocked access attempts :p (but I think that only if you download v2.0.13 of Bad Behavior).

In any case, thanks for I great module that enables such a needed feature and protection. I was going crazy with my sites crashing by aggressive visits from bots and weird connections.

Steel Rat’s picture

I think Calbasi has it right above (though his/her description is still a bit cryptic ;) )

But the documentation DOES need to be corrected.

You do not copy the resulting bad-behavior directory to the badbehavior dir, you copy the CONTENTS of the bad-behavior dir to the badbehavior module dir. It's confusing because there is yet another bad-behavior folder in the bh install folder.

But, your module folder structure should look like this if you do it correctly:

..../drupal/modules/badbehavior/bad-behavior

Not like this:

..../drupal/modules/badbehavior/bad-behavior/bad-behavior

You'll end up with the latter if you follow the readme and the module won't work properly. Once I copied the contents of the bh install to the badbehavior folder created by the module, disabled and re-enabled the module, it worked as expected (so far)

sutharsan’s picture

Title: Bad Behavior directory not found » Improve README.txt
Version: 5.x-2.0-beta1 » 6.x-1.0-rc2
Category: support » bug
Status: Active » Needs review
StatusFileSize
new1.35 KB

I've come the same way. readme.txt instructions are outdated and confusing

1. Download link in the readme.txt file is outdated. The link on the project page is correct.
2. Change the installation text to explain (with example) where to install what.

The above is probably also applicable to the 5.x-1.x-dev version.

shevot’s picture

Thanks for the solution puriso is correct, and the README.txt should be corrected. The contents of the 1st bad-behavior folder should be copied directly under the original badbehavior folder, the second should be the same. The directory should look like this:
modules/badbehavior/bad-behavior
NOT
modules/badbehavior/bad-behavior/bad-behavior
Under the modules/badbehavior directory you should have the following files:
COPYING
LICENSE.txt
README.txt
bad-behavior-generic.php
bad-behavior-lifetype.php
bad-behavior-mediawiki.php
bad-behavior-wordpress-admin.php
bad-behavior-wordpress.php
badbehavior.info
badbehavior.install
badbehavior.module
index.html
Under the modules/badbehavior directory you should also have a bad-behavior folder with the following files:
banned.inc.php
blackhole.inc.php
blacklist.inc.php
common_tests.inc.php
core.inc.php
functions.inc.php
google.inc.php 0 k
housekeeping.inc.php
index.html
konqueror.inc.php
lynx.inc.php
movabletype.inc.php
mozilla.inc.php
msie.inc.php
msnbot.inc.php
opera.inc.php
post.inc.php
responses.inc.php
safari.inc.php
screener.inc.php
trackback.inc.php
version.inc.php
whitelist.inc.php

When you download the bad-behavior from the 3rd party site do not unzip it in the badbehavior folder like they say to. Instead unzip it some where else and then copy the files and folder to their respective places.

calbasi’s picture

I think it's due to my poor English skills :-p

Regards

sutharsan’s picture

calbasi, use the community. There are plenty of people around who can help you out. Find a spanish Drupal user group.

calbasi’s picture

???? I can, more o less, understand your English :-p My message was about #11
Steel Rat's joke...

Ps. my English is not very good, but my jokes, in English, are even worse my Catalan jokes :-D

Ps. I think this issue have an easy solution. I can't understand how is possible it hadn't been closed in months!

gregarios’s picture

I have some pretty complete instructions here for v2.1.2:

http://drupal.org/node/422974#comment-2429208

gregarios’s picture

Status: Needs review » Closed (fixed)