-
Notifications
You must be signed in to change notification settings - Fork 1
Troubleshooting
Q: I received a PHP Fatal Error when I installed Bad Behavior and now my site doesn’t work at all! Or, I got the “white screen of death”!
A: This occurs when one or more of Bad Behavior’s files was not uploaded completely or was corrupted during (or after) upload. If you’re using FTP, be sure to set your FTP client to upload files with the extensions .php and .ini in ASCII mode. If this doesn’t help, try uploading with a different FTP client, or use SFTP.
If you are using Composer, ensure your autoloader is up to date by running composer dump-autoload.
If you still get a fatal error, make a copy of the error message (if you get the white screen of death, the error message is logged on the server; ask your web host for a copy) and then open a bug report on GitHub.
Q: I upgraded to 2.3.0 and my custom bb2_read_settings() function is no longer being called!
A: As of 2.3.0, global function overrides for settings and database hooks have been deprecated in favor of the OOP HostAdapterInterface. To restore custom behavior, you must implement HostAdapterInterface and pass your custom adapter to the BadBehaviour constructor. See the Writing a Custom Adapter guide.
Q: Bad Behaviour is blocking my CLI scripts or Cron jobs!
A: By design, BadBehaviour::run() automatically short-circuits and returns if php_sapi_name() === 'cli'. If your cron job is triggering HTTP requests to your web server (e.g., via curl), ensure your cron script sends a legitimate User-Agent string and Accept headers so it does not trigger the HTTP fingerprinting rules.