WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] I Figured Out - Warning: Cannot modify header information Photo Example (3 posts)

  1. smecham
    Member
    Posted 4 years ago #

    Hi,

    I just spent the last few hours trying to get my new WordPress blog working, like many on here.

    I kept getting the error:

    Warning: Cannot modify header information - headers already sent by (output started at /seanscarpetcare.com/blog/wp-config.php:1) in /seanscarpetcare.com/blog/wp-login.php on line 302

    The solution that worked for me:

    It had nothing to do with line 1 ("...php:1" <-) and nothing to do with with line 302.

    The whole problem was right here: (the code at the bottom of the wp-config.php file)

    *this is the actual code at the bottom

    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');
    _______________________________________________ <- there was this space (the line represents the end of the file)

    To solve the problem I just removed the space

    /** Sets up WordPress vars and included files. */
    require_once(ABSPATH . 'wp-settings.php');

    I made website to show this:

    http://www.seanscarpetcare.com/noheaderproblem.htm

    Hope this helps....Caused me a lot of trouble so I thought I would help

  2. s_ha_dum
    Member
    Posted 4 years ago #

    I just saw a similar post about this.

    I've tried to duplicate the newline problem. I can't. I've tried. One newline doesn't break my install. Half a dozen newlines don't break it. Newlines with with spaces, or a dozen spaces, don't break it. Newlines with spaces don't break it. Newlines before the closing PHP tag don't break it. Newlines after the closing PHP tag don't break it. Newlines without a closing PHP tag at all don't break it. And I've tried with a couple of different installs.

    I'm not trying to say that you are wrong. I just can't duplicate the problem. That makes it interesting. The only thing that comes to mind is that maybe there was a hidden control character on that line. I do vaguely recall something about this though...

  3. smecham
    Member
    Posted 4 years ago #

    Well maybe....I re-installed the files a couples of times and kept having the same trouble until I found that space.

    I posted this because many people have the same error codes I had and the suggestions to fix them didn't work for me. P.S. There is no '?>' at the end of the file either, like there is supposed to be. But it works, so I am not sure. Another option that hopefully someone can use.

Topic Closed

This topic has been closed to new replies.

About this Topic