WordPress.org

Ready to get started?Download WordPress

Forums

[closed] re: Warning: Cannot modify header information - headers already (19 posts)

  1. dax702
    Member
    Posted 2 years ago #

    So now I'm suddenly getting this warning, 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 wp-config.php on line 1 and pluggable.php.

    Here's a question - Can these files get modified without the date changing when looking at them on the FTP? In other words, I'm looking at all the file dates and none of them have been modified for months.. This is driving me made, already spent a good 6 hours reading forums and trying stuff......Wordpress is starting to feel like Joomla =(

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    What is the full error message?

  3. dax702
    Member
    Posted 2 years ago #

    When attempting to log into the admin backend:

    Warning: Cannot modify header information - headers already sent by (output started at /home/robertco/public_html/web/wp-config.php:1) in /home/xxx/public_html/web/wp-login.php on line 353

    Warning: Cannot modify header information - headers already sent by (output started at /home/robertco/public_html/web/wp-config.php:1) in /home/xxx/public_html/web/wp-login.php on line 365

    Warning: Cannot modify header information - headers already sent by (output started at /home/robertco/public_html/web/wp-config.php:1) in /home/xxx/public_html/web/wp-includes/pluggable.php on line 737

    Warning: Cannot modify header information - headers already sent by (output started at /home/robertco/public_html/web/wp-config.php:1) in /home/xxx/public_html/web/wp-includes/pluggable.php on line 738

    Warning: Cannot modify header information - headers already sent by (output started at /home/robertco/public_html/web/wp-config.php:1) in /home/xxx/public_html/web/wp-includes/pluggable.php on line 739

    Warning: Cannot modify header information - headers already sent by (output started at /home/robertco/public_html/web/wp-config.php:1) in /home/xxx/public_html/web/wp-includes/pluggable.php on line 934

    When trying to login as a subscriber on the frontend, these come up in the sidebar area where my login widget is:

    Warning: Cannot modify header information - headers already sent by (output started at /home/robertco/public_html/web/wp-config.php:1) in /home/xxx/public_html/web/wp-includes/pluggable.php on line 737

    Warning: Cannot modify header information - headers already sent by (output started at /home/robertco/public_html/web/wp-config.php:1) in /home/xxx/public_html/web/wp-includes/pluggable.php on line 738

    Warning: Cannot modify header information - headers already sent by (output started at /home/robertco/public_html/web/wp-config.php:1) in /home/xxx/public_html/web/wp-includes/pluggable.php on line 739

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    The issue is in your wp-config.php file. See Solving "headers already sent" warnings.

  5. dax702
    Member
    Posted 2 years ago #

    I read that faq several times. Here is my wp-config.php file. I cannot find anything wrong with it:

    [Code moderated as per the Forum Rules. Please use the pastebin]

  6. dax702
    Member
    Posted 2 years ago #

    Damn, I thought it was this line define( ‘EMPTY_TRASH_DAYS’, 10 ); because it's using the wrong single quote marks but fixing it didn't seem to change anything,, ugh!

  7. dax702
    Member
    Posted 2 years ago #

    http://pastebin.com/YW3Reuxh for my wp-config file. It's showing a blank line at the end, but I think pastebin put that in because there is no blank line in the file......

  8. dax702
    Member
    Posted 2 years ago #

    When attempting to log into the admin backend, it's showing this too now:

    Warning: Cannot modify header information - headers already sent by (output started at /home/xxxx/public_html/web/wp-config.php:1) in /home/robertco/public_html/web/wp-login.php on line 353

    Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxx/public_html/web/wp-config.php:1) in /home/robertco/public_html/web/wp-login.php on line 365

  9. dax702
    Member
    Posted 2 years ago #

    Does anyone know the answer to the question I asked about if php files can be changed without their last modified dates changing when looking at them in Filezilla?

  10. dax702
    Member
    Posted 2 years ago #

    Ok, the problem is finally solved. The FAQ article should be changed so that other people don't pull their hair out like I did:

    This statement is entirely incorrect:
    Open that file in a plain text editor (NOT MS Word or similar. Notepad or BBEdit are fine).

    You CANNOT use Notepad to check these php files. Notepad will NOT display strange characters all the time. I asked a friend for help. He opened the file in HTML Kit http://www.htmlkit.com/ and saw three characters at the beginning of my wp config file. Those characters did not show up no matter how many times I looked at that file in both Windows Notepad and Notepad++.

    From now on, I'm not going to edit any php file unless it's with HTML Kit.

  11. esmi
    Forum Moderator
    Posted 2 years ago #

    Just because you cannot see anything does not mean that PHP sees the same.

    Relevant Codex section

  12. dax702
    Member
    Posted 2 years ago #

    Notepad or BBEdit are fine

    Notepad is NOT fine. Using notepad to view the php files caused me to waste over 6 hours. I could have held down backspace at the beginning of that file for all eternity and it wouldn't have erased the characters.

  13. dax702
    Member
    Posted 2 years ago #

     those are the three characters

  14. Elizabeth Richardson
    Member
    Posted 2 years ago #

    Thanks dax702 ... you just helped me out immensely ... though mine was also a blank space at the end of wp-config.

  15. izem013
    Member
    Posted 2 years ago #

    thank you dax702

    HTML Kit helped me to selove the problem

  16. Squid
    Member
    Posted 1 year ago #

    I have the same problem but can't see anything with HTML kit. Should I choose to convert the file when opening it on HTML kit tools (my wp-config is in UTF8 obviously)?

    All help would be much appreciated.

  17. ibart
    Member
    Posted 1 year ago #

  18. Andrew
    Forum Moderator
    Posted 1 year ago #

    Squid & ibart,

    Can you post your issues on your own thread? You're unlikely to receive help on such an old thread.

  19. @ibart, please do not cross post into other threads like that. It doesn't help you any faster and makes it harder for us to help helping you.

Topic Closed

This topic has been closed to new replies.

About this Topic