• 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?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter lars

    (@lars)

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

    Thread Starter lars

    (@lars)

    *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).

    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.

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

    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.

    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…

    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. 😀

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Header error in single post search results’ is closed to new replies.