Support » Plugin: Bad Behavior » [Plugin: Bad Behavior] Latest Update Broke my site!!

  • Resolved WillOfTheWeb


    I just upgraded Bad Behavior and now I am getting a load of errors plus once I login to the admin area I cant see anything just the errors on the page!

    My site is located here

    Warning: Invalid argument supplied for foreach() in paths/ on line 176

    Warning: Cannot modify header information – headers already sent by (output started at paths/ in paths/ on line 9

    Warning: session_start() [function.session-start]: Cannot send session cookie – headers already sent by (output started at paths/ in paths/ on line 8

    Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at paths/ in paths/ on line 8

Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator Jan Dembowski


    Brute Squad and Volunteer Moderator

    Huh, second one this morning. The current version works for me, but more than one person having an issue isn’t a coincidence.

    Deleting the plugin directory wp-content/plugins/bad-behavior should let you back into your WordPress dashboard. Just delete that one bad-behavior and nothing else.

    You should be able to do that via FTP or whatever file management tools your host provides you with.

    Normally the first thing to do is try checking your wp-config.php file for white spaces.

    If it’s the wp-config.php file then you should be able to fix it using these steps.

    Make a safe backup copy of your existing wp-config.php file. Make sure that’s somewhere safe and call it wp-config-SAVE.php.

    Now copy over wp-config-sample.php on top of your wp-config.php file. You did make that backup copy, right?

    Now using the most plain text editor you have (notepad works, Notepad++ works better, vi is best) edit the new wp-config.php file with your details like so:

    // ** MySQL settings ** //
    define('DB_NAME', 'your-db-name');    // The name of the database
    define('DB_USER', 'your-db-user');     // Your MySQL username
    define('DB_PASSWORD', 'your-db-password'); // ...and password

    Save that and visit your site. See if that lets you back in.

    Hi, had a look through the config file and no white spaces. Site worked fine until last update.

    Moderator Jan Dembowski


    Brute Squad and Volunteer Moderator

    You can’t see them, their white spaces that’s why I recommended you start fresh…

    Your site is back up (that’s a good thing) so that’s an improvement at least.

    I didnt want to go into the specifics but I had a look and there were no white spaces that would cause problems. I know about white spaces causing issues in the config file and in the htaccess file so I knew what you meant.

    Before I completely removed Bad behavior I did use the sample config file and re-entered the database connections and secrets etc but the problem still persisted. I also removed the plugin and re-installed it and the errors returned. 🙁

    Hi Will

    I (and others) have had success with rolling back Bad Behavior to the previous version, which we’re planning to keep using until the latest release (2.2.9) is replaced with a fixed version.

    The link to the previous version (courtesy of Jan in another thread) is:

    Best of luck


    Out of curisoty I deactivated all my plugins and then downloaded and installed Bad Behavior again. This time I got errors but I could still use the admin area. below is an error I got which I didnt get before:

    The plugin generated 204 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.

    If you re-install the previous version instead, you should find that it activates and works without any errors.

    It’s a typo in the code for the last “foreach” statement.

    it says
    foreach ($bb2_spambots_utl as $spambot)

    it should say
    foreach ($bb2_spambots_url as $spambot)

    Bingo, problem solved, cheers pbeckley!

    FYI: its in the file

    Plugin Author error


    This was fixed in Bad Behavior 2.2.10.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘[Plugin: Bad Behavior] Latest Update Broke my site!!’ is closed to new replies.