WordPress.org

Support

Support » How-To and Troubleshooting » re: Warning: Cannot modify header information – headers already

re: Warning: Cannot modify header information – headers already

  • 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 =(

Viewing 15 replies - 1 through 15 (of 18 total)
  • esmi
    Forum Moderator

    @esmi

    What is the full error message?

    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

    esmi
    Forum Moderator

    @esmi

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

    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]

    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!

    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……

    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

    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?

    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.

    esmi
    Forum Moderator

    @esmi

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

    Relevant Codex section

    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.

     those are the three characters

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

    thank you dax702

    HTML Kit helped me to selove the problem

    Squid
    Member

    @karimtahtoandpartnersfi

    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.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘re: Warning: Cannot modify header information – headers already’ is closed to new replies.