• Resolved soccergrl

    (@soccergrl)


    I’m now suddenly getting this warning and can’t login to the admin backend anymore. Read NUMEROUS posts on this forum about this warning and simply cannot figure this thing out. I’ve checked the files for whitespace, in this case it’s complaining about my_functions.php on line 1 and pluggable.php.

    My site has been working for months and I just received this warning today. The only edit I made was to the end of my_functions.php definitely not line 1. And then I tried deleting a plugin and when it asked if I wanted to delete all files and I clicked yes, this warning appeared and i couldn’t delete all the files. I then looked for the files on via FTP and none of them were there. Any help? Please!

Viewing 15 replies - 1 through 15 (of 17 total)
  • Moderator James Huff

    (@macmanx)

    Would you please quote the full error?

    Thread Starter soccergrl

    (@soccergrl)

    Warning: Cannot modify header information – headers already sent by (output started at /home/content/p3nexnas06_data03/56/2200256/html/wp-content/themes/blankslate-child/lib/my_functions.php:1) in /home/content/p3nexnas06_data03/56/2200256/html/wp-includes/pluggable.php on line 1178

    Moderator James Huff

    (@macmanx)

    You have unexpected whitespace (either a space or an entire line) on line 1 of the /wp-content/themes/blankslate-child/lib/my_functions.php file. See this guide for more info.

    Alternatively, replacing the file with one from a fresh download may resolve the issue.

    Thread Starter soccergrl

    (@soccergrl)

    No whitespace because I didn’t even touch the line 1. I did take an old file with none of today’s edits and now it works again. The only changes I made was to my login php with and action. Could this cause the problem?

    Moderator James Huff

    (@macmanx)

    No, whatever happened was done to my_functions.php, as evidenced by it being fixed when you replaced the file. ??

    At some point it was modified, but it probably didn’t appear as a problem until you made the login modification.

    When malware on your local machine is the issue, we see responses such as:

    No whitespace because I didn’t even touch the line 1.

    …and the response from above…

    Moderator James Huff

    (@macmanx)

    Run a scan just to be sure, but don’t panic. The line could have been introduced by malware, or it could have been part of a change legitimately made at some point. Either way, you didn’t do anything to bring it about until now. ??

    Yes, do not ‘panic’ but follow advice on this related to your local machine and not this volunteer forum. Do you know that a local machine (computer) can compromise a site?

    Moderator James Huff

    (@macmanx)

    What do you mean by not following advice on this forum? Seems contradictory to, ya know, offering advice on this forum.

    on this related to your local machine and not this volunteer forum

    Moderator James Huff

    (@macmanx)

    Ah, you mean seek malware advice on your local machine at a support system for you local machine, not the WordPress forums.

    Thread Starter soccergrl

    (@soccergrl)

    These are the 2 actions I was playing with when I received the error message:
    add_filter(‘login_message’, ‘my_addition_to_login_form_middle’);
    function my_addition_to_login_form_middle() {
    return ‘<div style=”text-align: center; font-size:14px; color:#ed1c2e;”>By logging in…</div>’;
    }

    //Add Terms of Service link to login
    function my_login_form(){
    echo ‘<p>*By logging in, you are agreeing to Terms of Service.</p>’;
    }
    add_action( ‘login_form’, ‘my_login_form’ );

    I don’t think I have any malware.

    Moderator James Huff

    (@macmanx)

    Those lines are fine, they just probably interacted with whatever was done to my_functions.php long ago.

    Nothing to worry about now. ??

    Thread Starter soccergrl

    (@soccergrl)

    I will try adding the code back in and see if it happens again.

    Thank you for your help.

    Moderator James Huff

    (@macmanx)

    You’re welcome!

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Cannot modify header warning’ is closed to new replies.