WordPress.org

Ready to get started?Download WordPress

Forums

All In One WP Security & Firewall
[resolved] Cannot modify header information (15 posts)

  1. Joey
    Member
    Posted 9 months ago #

    I use a plugin called BackupBuddy to backup my sites and a script called Importbuddy to restore / deploy them. Generally this process works just fine and I'm able to restore my sites including plugins and settings without any problems.

    However, for whatever reason, All in One WP Security and Firewall just doesn't work after being restored by Importbuddy. It causes "Cannot Modify Header Information" errors on the wp-admin login page.

    To be clear, All in One WP Security and Firewall works just fine on the site from which the backup was made, and I can install the plugin after I've restored/deployed the site, but it doesn't survive the restoration itself - even if disabled while being restored. In fact, even re-installing the plugin won't fix the errors after they've appeared.

    All that said, does anyone have any idea what would cause "Cannot modify header information" errors? It's my understanding that they're usually related to extra returns in functions.php but that clearly isn't the case since the errors occur regardless of the theme in place.

    Any ideas?

    http://wordpress.org/plugins/all-in-one-wp-security-and-firewall/

  2. Joey
    Member
    Posted 9 months ago #

    Sample errors enclosed, if they're helpful:

    Warning: Cannot modify header information - headers already sent by (output started at /home/XXXX/public_html/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-debug-logger.php:52) in /home/XXXX/public_html/wp-includes/pluggable.php on line 698

    Warning: Cannot modify header information - headers already sent by (output started at /home/XXXX/public_html/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-debug-logger.php:52) in /home/XXXX/public_html/wp-includes/pluggable.php on line 699

    Warning: Cannot modify header information - headers already sent by (output started at /home/XXXX/public_html/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-debug-logger.php:52) in /home/XXXX/public_html/wp-includes/pluggable.php on line 700

    Warning: Cannot modify header information - headers already sent by (output started at /home/XXXX/public_html/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-debug-logger.php:52) in /home/XXXX/public_html/wp-includes/pluggable.php on line 703

    Warning: Cannot modify header information - headers already sent by (output started at /home/XXXX/public_html/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-debug-logger.php:52) in /home/XXXX/public_html/wp-includes/pluggable.php on line 704

    Warning: Cannot modify header information - headers already sent by (output started at /home/XXXX/public_html/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-debug-logger.php:52) in /home/XXXX/public_html/wp-includes/pluggable.php on line 705

    Warning: Cannot modify header information - headers already sent by (output started at /home/XXXX/public_html/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-debug-logger.php:52) in /home/XXXX/public_html/wp-includes/pluggable.php on line 706

    Warning: Cannot modify header information - headers already sent by (output started at /home/XXXX/public_html/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-debug-logger.php:52) in /home/XXXX/public_html/wp-includes/pluggable.php on line 709

    Warning: Cannot modify header information - headers already sent by (output started at /home/XXXX/public_html/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-debug-logger.php:52) in /home/XXXX/public_html/wp-includes/pluggable.php on line 710

    Warning: Cannot modify header information - headers already sent by (output started at /home/XXXX/public_html/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-debug-logger.php:52) in /home/XXXX/public_html/wp-includes/pluggable.php on line 711

    Warning: Cannot modify header information - headers already sent by (output started at /home/XXXX/public_html/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-debug-logger.php:52) in /home/XXXX/public_html/wp-includes/pluggable.php on line 712

  3. mra13
    Member
    Plugin Author

    Posted 9 months ago #

    When you are importing a site using importbuddy, are you importing the security plugin too?

  4. Joey
    Member
    Posted 9 months ago #

    Yes, I'm importing a fully functional site with the security plugin configured and in place. That said, I think I figured it out. It seems to be related to the permissions on the log file:

    wp-security-log.txt

    The file is set to 644 but, for whatever reason, setting it to 777 fixes the errors. Interestingly, on the original non-imported site, the permissions are 644 and it's working just fine.

  5. Joey
    Member
    Posted 9 months ago #

    Here's what the plugin was attempting to write to the log file:

    [10/15/2013 8:59 PM] - FAILURE : Error inserting record into wp_aiowps_login_activity
    [10/15/2013 8:59 PM] - FAILURE : Error inserting record into wp_aiowps_login_activity
    [10/15/2013 9:00 PM] - FAILURE : Error inserting record into wp_aiowps_login_activity
    [10/15/2013 9:00 PM] - FAILURE : Error inserting record into wp_aiowps_login_activity
    [10/16/2013 1:07 AM] - FAILURE : Error inserting record into wp_aiowps_login_activity
    [10/16/2013 1:07 AM] - FAILURE : Error inserting record into wp_aiowps_login_activity

  6. wpsolutions
    Member
    Plugin Author

    Posted 9 months ago #

    At login time the plugin hooks into the login event to store some account details regarding account activity. It stores these details in a table called "yourprefix_aiowps_login_activity". (where "yourprefix_" is whatever you have set the DB prefix to - sounds like for you it is "wp_")

    Can you check if this table actually exists in your database?

    If it does, then another good place to glean more info about why the SQL command failed is from the error_log files on your server if you have any.

  7. Joey
    Member
    Posted 9 months ago #

    Just checked and the table does exist and it does contain data.

    Also, as a side note, changing the permissions on the log file proved to be a temporary fix. Since, after updating the plugin, the errors returned on all my sites. Any idea how I might be able to work around this or troubleshoot it further?

  8. wpsolutions
    Member
    Plugin Author

    Posted 9 months ago #

    Did you check for any error_log files on your server?

  9. Joey
    Member
    Posted 9 months ago #

    I dug through the log files but didn't notice anything. Is there something specific I should be searching for beyond errors related specifically to that table? Or maybe I'm looking at the wrong logs?

  10. Joey
    Member
    Posted 9 months ago #

    I've been looking into this further and noticed that if I access wp-login.php directly, the errors vanish. However if I use /wp-admin/ and it redirects then the errors return. For whatever reason, this appears to be related to the reauth=1 flag at the end of the URL. I say that, since removing this flag also fixes the errors.

    Any idea why this might be the case?

  11. Joey
    Member
    Posted 8 months ago #

    Oh well, I can't sort it out. I guess I'll have to disable the plugin across all my sites. Anyway, I appreciate the help.

  12. wpsolutions
    Member
    Plugin Author

    Posted 8 months ago #

    @JoeytheSquid,
    We don't use the "reauth" query param in our plugin.

    I wonder if another plugin might be using it.

    Maybe you can try a test where you deactivate all other plugins except AIOWPS.
    Then see if you can reproduce the issue.
    If you can't, then maybe the problem lies with another plugin. Then proceed by activating each of the other plugins one by one and try reproducing the issue after each activation.

    Sorry we couldn't be of more help.

  13. Joey
    Member
    Posted 8 months ago #

    Actually I've already tried that. I migrated my base WordPress install via by Backupbuddy to a sandbox testing account and removed all my plugins (even backupbuddy). I also removed my theme framework, just in case that might be causing an issue.

    http://204.197.248.107/~sandbox/wp-admin/

    As you can see, when you login using the wp-admin URL, the errors appear. If you target wp-login.php directly, the errors stop:

    http://204.197.248.107/~sandbox/wp-login.php

    I've also turned off all of the settings and modifications within All In One WP Security & Firewall, but that doesn't help either. The only way to fix the problem is to turn off the plugin altogether.

    As I only build sites using a preconfigured version of WordPress, I can't say if the conflict is coming from my base WordPress install. So I suppose the next test is to install WordPress from scratch, add in the plugin, migrate via backupbuddy and see what happens.

  14. lusitano
    Member
    Posted 4 months ago #

    Same problem here and i am using a normal wordpress installation file. Its quite annoying but i also had to turn off the plugin to fix this problem.

  15. mbrsolution
    Member
    Posted 4 months ago #

    Hi Lusitano, this support Thread has been marked as resolved. Your best bet is to start a new support thread. I am sure will get more support that way.

    Also when you create the new support thread can you provide the errors reported in the log file, that would help.

Reply

You must log in to post.

About this Plugin

About this Topic