Title: Bad Behavior Plugin Warning Message
Last modified: August 20, 2016

---

# Bad Behavior Plugin Warning Message

 *  Resolved [genegem](https://wordpress.org/support/users/genegem/)
 * (@genegem)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/bad-behavior-plugin-warning-message/)
 * Just updated and got warning message (see below) so deactivated. Is there a bug
   in the latest update?
 * Warning: Invalid argument supplied for foreach() in /home/genegem/public_html/
   loseweightfastsystems.com/wp-content/plugins/bad-behavior/bad-behavior/blacklist.
   inc.php on line 176
 * Warning: Cannot modify header information – headers already sent by (output started
   at /home/genegem/public_html/loseweightfastsystems.com/wp-content/plugins/bad-
   behavior/bad-behavior/blacklist.inc.php:176) in /home/genegem/public_html/loseweightfastsystems.
   com/wp-content/plugins/bad-behavior/bad-behavior/screener.inc.php on line 9
 * > Thank you for contacting HostGator. There is an error in the code for the plugin
   > as I see the same error for a test WordPress installation. I suggest you contact
   > the developer of the plugin at [http://wordpress.org/support/plugin/bad-behavior](http://wordpress.org/support/plugin/bad-behavior)
   > in regards to this issue.
   > If you have any questions or concerns, please don’t hesitate to contact us.
   > We are more than happy to assist you.
   > Best regards,
   > Samuel H.
   >  Linux Systems Administrator HostGator.com LLC
 * [http://wordpress.org/extend/plugins/bad-behavior/](http://wordpress.org/extend/plugins/bad-behavior/)

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/bad-behavior-plugin-warning-message/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/bad-behavior-plugin-warning-message/page/2/?output_format=md)

 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [13 years, 9 months ago](https://wordpress.org/support/topic/bad-behavior-plugin-warning-message/#post-3013110)
 * >  Warning: Cannot modify header information – headers already sent by
 * Please give this a read.
 * [http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F](http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F)
 * And double check your `wp-config.php` file. Somewhere there is a white space 
   in it.
 *  Thread Starter [genegem](https://wordpress.org/support/users/genegem/)
 * (@genegem)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/bad-behavior-plugin-warning-message/#post-3013114)
 * Thank You. I’m not a coder so no point me looking for spaces whether black, white
   or purple. Wasn’t a problem before the update so was simpler just to deactivate
   and delete.
 *  Thread Starter [genegem](https://wordpress.org/support/users/genegem/)
 * (@genegem)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/bad-behavior-plugin-warning-message/#post-3013115)
 * Obviously a fault in the update because previous versions didn’t give these errors
   so I guess it’s simpler to stop using it and delete it altogether until the developer
   sorts out his bugs.
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [13 years, 9 months ago](https://wordpress.org/support/topic/bad-behavior-plugin-warning-message/#post-3013117)
 * That is your choice of course, and my advice is always “you should do what you
   want”. 😉
 * But I’ve just installed the version 2.2.9 of that plugin. The plugin is fine 
   and it is probably your `wp-config.php` file. 99.999% of the time that’s the 
   culprit.
 *  [zicocarioca](https://wordpress.org/support/users/zicocarioca/)
 * (@zicocarioca)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/bad-behavior-plugin-warning-message/#post-3013130)
 * Hi…
    I tried the proposed solution [above](http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F)
   and it didn’t work. I think I did the whole thing just right, but nothing… It
   just didn’t work.
 * Also, no apparently meaningful white spaces found on the described code.
    I don’t
   think I can find a solution by myself.
 * Some help will be kindly appreciated.
 * **Can anyone please** take me back to the previous version of BadBehavior? I 
   just can’t find a link to the version 2.2.8
 * Thanks in advance!
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [13 years, 9 months ago](https://wordpress.org/support/topic/bad-behavior-plugin-warning-message/#post-3013133)
 * Looks like you’re not alone alright.
 * See this reply for more details on how to check your `wp-config.php` file (if
   that’s it or not).
 * [http://wordpress.org/support/topic/plugin-bad-behavior-latest-update-broke-my-site?replies=2#post-3129787](http://wordpress.org/support/topic/plugin-bad-behavior-latest-update-broke-my-site?replies=2#post-3129787)
 * [@zicocarioca](https://wordpress.org/support/users/zicocarioca/), the older versions
   can be manually downloaded from the Developers tab on that page.
 * [http://wordpress.org/extend/plugins/bad-behavior/developers/](http://wordpress.org/extend/plugins/bad-behavior/developers/)
 * The link for 2.2.8 is [http://downloads.wordpress.org/plugin/bad-behavior.2.2.8.zip](http://downloads.wordpress.org/plugin/bad-behavior.2.2.8.zip)
 *  [zicocarioca](https://wordpress.org/support/users/zicocarioca/)
 * (@zicocarioca)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/bad-behavior-plugin-warning-message/#post-3013135)
 * Thanks a lot for the help and also the link **[@jan](https://wordpress.org/support/users/jan/)**!
   
   Somehow I couldn’t think of such a simple yet clever way to find that version
   again.
 * Cheers!
 * P.S: Even though I’m not a coder I suspect there’s some conflict between the 
   most recent version of BadBehavior (2.2.9) and some other installed plugin.
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [13 years, 9 months ago](https://wordpress.org/support/topic/bad-behavior-plugin-warning-message/#post-3013140)
 * >  P.S: Even though I’m not a coder I suspect there’s some conflict between the
   > most recent version of BadBehavior (2.2.9) and some other installed plugin.
 * That may be possible, but normally when that happens you get a different error
   message. The “Warning: Cannot modify header information – headers already sent
   by” error message is almost always either a problem with the `wp-config.php` 
   file or some other file adding a white space.
 *  [fisnollo](https://wordpress.org/support/users/anollo/)
 * (@anollo)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/bad-behavior-plugin-warning-message/#post-3013157)
 * The link you reference says _“This could be true about some other file too, so
   please check the error message, as it will list the specific file name where 
   the error occurred”_.
 * In my case, the error refers to the **blacklist.inc.php** file, so doesn’t that
   mean that’s where the error is originating from, not the config file?
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [13 years, 9 months ago](https://wordpress.org/support/topic/bad-behavior-plugin-warning-message/#post-3013160)
 * > In my case, the error refers to the blacklist.inc.php file, so doesn’t that
   > mean that’s where the error is originating from, not the config file?
 * Sort of. Kinda. Ish.
 * I know, that’s not really helpful but I’ll explain, probably poorly. 😉 For now,
   consider manually rolling back to the earlier version.
 * This is a specific to that file error message.
 *     ```
       Warning: Invalid argument supplied for foreach() in /home/genegem/public_html/loseweightfastsystems.com/wp-content/plugins/bad-behavior/bad-behavior/blacklist.inc.php on line 176
       ```
   
 * That’s saying there is a problem with the `foreach()` in that file which is good
   error message ’cause it’s saying “THERE on line 176 of that file”.
 * This is a brain teaser error message.
 *     ```
       Warning: Cannot modify header information - headers already sent by (output started at /home/genegem/public_html/loseweightfastsystems.com/wp-content/plugins/bad-behavior/bad-behavior/blacklist.inc.php:176) in /home/genegem/public_html/loseweightfastsystems.com/wp-content/plugins/bad-behavior/bad-behavior/screener.inc.php on line 9
       ```
   
 * The reason it’s a brain teaser is that it’s telling you that _something else_
   sent the headers already when processing the files `blacklist.inc.php` and `screener.
   inc.php` which is good but you don’t know what sent the headers already.
 * It could be and usually is the `wp-config.php` file. Or it could some other file
   in the Bad Behavior plugin that was processed already.
 * Since this is being reported by several people, it _might be_ the plugin (odds
   are good) but checking your `wp-config.php` file [as I outlined](http://wordpress.org/support/topic/plugin-bad-behavior-latest-update-broke-my-site?replies=2#post-3129787)
   never hurts either.
 *  [411plumb](https://wordpress.org/support/users/411plumb/)
 * (@411plumb)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/bad-behavior-plugin-warning-message/#post-3013172)
 * I’ve got the same error as everyone else.
 * > Warning: Invalid argument supplied for foreach() in /home/*****/public_html/
   > wp-content/plugins/bad-behavior/bad-behavior/blacklist.inc.php on line 176
   > Warning: Cannot modify header information – headers already sent by (output
   > started at /home/*****/public_html/wp-content/plugins/bad-behavior/bad-behavior/
   > blacklist.inc.php:176) in /home/*****/public_html/wp-content/plugins/bad-behavior/
   > bad-behavior/screener.inc.php on line 9
   > Warning: session_start() [function.session-start]: Cannot send session cache
   > limiter – headers already sent (output started at /home/*****/public_html/wp-
   > content/plugins/bad-behavior/bad-behavior/blacklist.inc.php:176) in /home/*****/
   > public_html/wp-content/plugins/si-contact-form/si-contact-form.php on line 
   > 2189
 * There are no white spaces in the wp-config file, the update is broken it is that
   simple. Deactivating the plug-in in the plug-ins page on the dashboard will remove
   the problem, and I have reverted to the old version for now. Will watch for a
   bug update before installing an update.
 *  [zicocarioca](https://wordpress.org/support/users/zicocarioca/)
 * (@zicocarioca)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/bad-behavior-plugin-warning-message/#post-3013173)
 * **It might help:** I don’t know how to explain this correctly but I’d like to
   tell you what I did in order to get rid of the BadBehavior 2.2.9 update bug.
 * After trying to fix the `<a href="http://codex.wordpress.org/FAQ_Troubleshooting#
   How_do_I_solve_the_Headers_already_sent_warning_problem.3F">cannot modify header
   </a> blablabla` bug and performing some sort of [search and destroy] extra white
   spaces on the conflicting files (inluding the wp_config.php file) without success,
   I decided to delete the BadBehavior pluging via FTP and [reinstalled the 2.2.8](http://downloads.wordpress.org/plugin/bad-behavior.2.2.8.zip)
   version.
 * Later, I realised that even though the main problem was solved I was still experiencing
   this silly nightmare on my dashboard since I was reading the same error as a 
   header on every single feed… for example on: “recent drafts”, “WordPress Blog”,“
   Plugins” and also on “Other WordPress News”… SO WHAT did I do?
 * Simple:
    1) Emptied every single cache. I use W3TC. 2) Purged the cache in CloudFlare
   too. [If you use CloudFlare, remember to activate the reverse proxy thing on 
   the BadBehavior settings panel] 3) And finally, since the problem seemed to persist,
   I also deleted the storaged cache on my own disk via the Options menu in Firefox,
   since it’s the web browser I was using along this process.
 * Now everything seems to work just fine.
 * Of course, I know this is not a proper fix for the 2.2.9 update bug BUT AT LEAST
   I’m running the BadBehavior 2.2.8 plugin again. I’ll wait and see.
 * I hope this helps.
    Cheers from Barcelona!
 *  [Jonathan UK](https://wordpress.org/support/users/jonathan-uk/)
 * (@jonathan-uk)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/bad-behavior-plugin-warning-message/#post-3013174)
 * Come on Jan, aren’t you’re ready to concede yet? 😉
 * I’m no coder, but surely this is a buggy upgrade? When I applied the upgrade,
   my site broke. When I deactivated it (and later, when I deleted it and restored
   the 2.2.8 version), my site worked again.
 * Thank you for the link to the various versions – I didn’t know where to find 
   it, but am now very pleased to have been able to restore a working version.
 *  [pbeckley](https://wordpress.org/support/users/pbeckley/)
 * (@pbeckley)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/bad-behavior-plugin-warning-message/#post-3013200)
 * 2.2.9 contains a typo in the blacklist.inc.php
 * the last foreach loop says
 * `foreach ($bb2_spambots_utl as $spambot)`
 * it should say
 * `foreach ($bb2_spambots_url as $spambot)`
 * I know not everyone feels comfortable changing things like this themselves, but
   you can do it from the plugin editor inside WordPress if you’re adventurous enough.
 *  [fisnollo](https://wordpress.org/support/users/anollo/)
 * (@anollo)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/bad-behavior-plugin-warning-message/#post-3013219)
 * Thanks pbeckley, that fix worked for me.

Viewing 15 replies - 1 through 15 (of 18 total)

1 [2](https://wordpress.org/support/topic/bad-behavior-plugin-warning-message/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/bad-behavior-plugin-warning-message/page/2/?output_format=md)

The topic ‘Bad Behavior Plugin Warning Message’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/bad-behavior.svg)
 * [Bad Behavior](https://wordpress.org/plugins/bad-behavior/)
 * [Support Threads](https://wordpress.org/support/plugin/bad-behavior/)
 * [Active Topics](https://wordpress.org/support/plugin/bad-behavior/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bad-behavior/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bad-behavior/reviews/)

 * 18 replies
 * 8 participants
 * Last reply from: [error](https://wordpress.org/support/users/error/)
 * Last activity: [13 years, 7 months ago](https://wordpress.org/support/topic/bad-behavior-plugin-warning-message/page/2/#post-3013423)
 * Status: resolved