WordPress.org

Forums

Mobile only "Warning: Cannot modify header information - headers already sent by (8 posts)

  1. Duncanonu
    Member
    Posted 2 years ago #

    To begin, I'm new to most of this, so please walk me through any advice you might have slowly.

    Our website works fine from a PC.

    The problem occurs when trying to visit the site via mobile. We use Dudamobile for the mobile site. All of a sudden I am getting this message when I attempt to visit the site with my phone...

    Warning: Cannot modify header information - headers already sent by (output started at mydirectory/index.php:2)
    in /mypath/wp-includes/pluggable.php on line 876

    I removed my directory and path above. I don't think it's relative to the question and I don't want any security issues.

    Okay, here is the thing, like I said it works just fine from a PC (I tried both Chrome and Firefox, cache cleared, from multiple computers), but it also works fine if I put the mobile URL directly into the phone browser (ex: m.mysite.com). We also have an app that is a simple re-direct to the mobile site, and it works just fine. So to me, logically the problem must occur within the re-direct to dudamobile in wordpress, however the warning is pointing to code.

    I have read and tried the fixes listed on other threads. I have no spacing issues around the <?php or ?>. None of the files have been changed prior to this problem. The only thing new is perhaps an update to wordpress or a plugin. I did update everything recently.

    What confuses me and makes my issue unique from the others that I have searched, is that my site works fine from a pc browser (again, both chrome and firefox), but when attempting from mobile device, it won't complete the re-direct and instead gives me that header warning.

    Does anyone with more experience have any advice on why this could be happening? To me it seems like either the updates did something or somebody messed with my code. Nothing else on the site has been touched, at least not without my approval. Nothing has changed from the Dudamobile side either. The re-direct is the same way it has always been, no changes have been made on that end either. It worked fine and now it doesn't. Please help, I'm a local small business that averages over 300 unique mobile visits per day and now I find that we have been in single digits each day for the last week (Which is about when I updated WordPress). My business converts a very high % of those visitors into customers, so I am losing money as we speak. Help!

    Note: Even a temporary fix to get it working until I can figure out the problem would be extremely helpful.

    Thanks

  2. WPyogi
    Forum Moderator
    Posted 2 years ago #

    What's the site? Have you tried deactivating all plugins and switching to the default theme?

  3. Duncanonu
    Member
    Posted 2 years ago #

    Shantytubes.com

    No, I have not tried that. What exactly would that accomplish? Sorry I really don't know.

  4. Duncanonu
    Member
    Posted 2 years ago #

    I am noticing that my index.php file was edited the day before the problem arose. Is there a way to simply go back to a previous version of the file? I read something about "Revisions", but it does not appear as an option under my screen options in wordpress.

  5. WPyogi
    Forum Moderator
    Posted 2 years ago #

  6. WPyogi
    Forum Moderator
    Posted 2 years ago #

    Unfortunately, that is the case -

    http://sitecheck.sucuri.net/results/shantytubes.com/

    The articles above should be helpful, sorry to say.

  7. Duncanonu
    Member
    Posted 2 years ago #

    Thanks. I was able to locate the script and remove it. Any advice on how to keep this from happening again?

  8. WPyogi
    Forum Moderator
    Posted 2 years ago #

    Make sure you've gone through all of those articles - generally, just removing the hack code isn't always enough to prevent it happening again...they've often left "back-doors."

    In addition to a couple of the above, this fairly new article has more useful info:

    http://codex.wordpress.org/Brute_Force_Attacks

Topic Closed

This topic has been closed to new replies.

About this Topic