WordPress.org

Ready to get started?Download WordPress

Forums

Header error in single post search results (8 posts)

  1. lars
    Member
    Posted 10 years ago #

    When doing a search for some ,but not all terms, I get the following error message:
    <pre>
    Cannot modify header information - headers already sent by
    (output started at /hostpath/larsholst.info/httpd.www/blog/index.php:14) in <b>/hostpath/larsholst.info/httpd.www/blog/wp-blog-header.php</b>
    on line <b>351</b>
    </pre>
    Looking at the file, it seems to be related to search results that only return one post.
    Anyone?

  2. lars
    Member
    Posted 10 years ago #

    oops, sorry about the long line.
    the file name is code>wp-blog-header.php, if anyone wonders.

  3. lars
    Member
    Posted 10 years ago #

    *bump* and a recap:
    Warning: Cannot modify header information - headers already sent by (output started at index.php:20) in wp-blog-header.php on line 359
    URI: larsholst.info/blog - try searching for "bloggies"or "propaganda" (both terms only appear in one post).

  4. Bard09
    Member
    Posted 10 years ago #

    I am having this problem as well. To those who are getting this error, do you have your wordpress install in a seperate directory from your blog? This might not be the case, but it couldn't hurt to ask.

  5. mumeimagpie
    Member
    Posted 10 years ago #

    My install is in the same directory as my blog. I don't know about everyone else?

  6. Bard09
    Member
    Posted 10 years ago #

    I just fixed the problem for myself. I was using 1.01 code in my 1.2 header, innacurately to boot. Make sure your index.php file starts out like thus:
    <?php
    /* Don't remove this line. */
    require('./wordpress/wp-blog-header.php');
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>

    Also, if you have the following bit of code in your index.php, you can delete it (doesn't come included in the 1.2 index.php):
    <?php
    /* Don't remove these lines. */
    $blog = 1;
    ?>

    I hope this helps anyone who encounters the same problem. The beginning of my old index.php that I was using was *totally* different than the new index.php that comes with 1.2.

  7. Bard09
    Member
    Posted 10 years ago #

    Darn anti-spam protection is preventing me from making an edit, even after 5 minutes.
    In the code above, I forgot to change the following line (that I modified)
    require('./wordpress/wp-blog-header.php');
    to its default
    require('./wp-blog-header.php');
    Sorry about the confusion...

  8. mumeimagpie
    Member
    Posted 10 years ago #

    You know, the ONLY thing I changed was the <head> tag from what I had to what you specified... and now it seems to work. I wonder if it was working before for some reason. In any case, it is working now and I am very pleased!! So thanks for the tip. ^_^
    I can't think of any reason the head tag would be the source of the problem for me, but then, I'm not all that code-savvy anyhow. :-D

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.