annot modify header information - headers already sent by output

Discussion in 'PHP' started by merlinseo, Apr 25, 2009.

  1. #1
    Hi All,
    Can you please help me with this website issue.
    Its a custom website in PHP with Blog included at the bottom.

    WORKS PERFECT : When typed http://wwww(.)domainaname(.)com
    
    But DOESNT WORKS : When typed http://domainname(.)com
    
    or DOESNT WORKS : Even When typed http://www(.)domainname(.)com/index(.)php
    Code (markup):
    So if you see only when www.domainname.com is typed then only it works well
    If www is removed from domain name then I get an error
    Also I get an error if I add domainname.com/index.php

    ERROR : Warning: Cannot modify header information - headers already sent by (output started at /home/content/d/o/m/domainbuyerz/html/index.php:7) in /home/content/d/o/m/domainbuyerz/html/wp-includes/pluggable.php on line 850

    Summary : Error throw when typed domainname.com and Works fine with No error when www is typed meaning www.domainname.com works fine

    To see Live Error click here : Error without www & No Error with www

    All the code for above files index.php, pluggable.php & wp-blog-header.php is copied at below locations for reading, I have copied the code as follows

    index.php is found here : http://snipt.org/Umo
    pluggable.php is found here : http://snipt.org/Ump
    wp-blog-header.php is found here : http://snipt.org/Ung

    Can anybody suggest what is going wrong and Please help me to fix this issue

    Thanks a lot in advance

    Regards,
    Merlin seo
     
    merlinseo, Apr 25, 2009 IP
  2. crivion

    crivion Notable Member

    Messages:
    1,669
    Likes Received:
    45
    Best Answers:
    0
    Trophy Points:
    210
    Digital Goods:
    3
    #2
    its not a fatal error so u could get rid off by adding <?php error_reporting(0); ?> into header.php
     
    crivion, Apr 25, 2009 IP
    merlinseo likes this.
  3. merlinseo

    merlinseo Well-Known Member

    Messages:
    1,686
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    130
    #3
    Hi Crivion, Tried it but same result

    Guys, Awaiting more help, Please help me to fix this issue , Thanks a lot in advance
     
    merlinseo, Apr 26, 2009 IP
  4. mfscripts

    mfscripts Banned

    Messages:
    319
    Likes Received:
    4
    Best Answers:
    8
    Trophy Points:
    90
    Digital Goods:
    3
    #4
    "...Cannot modify header information - headers already sent by..." usually means that some content has already been sent to the browser before the request to send headers.

    An example would be if you output some content, the use header redirect within the code.

    I'd check wp-includes/pluggable.php on line 850 for any output of content to screen.
     
    mfscripts, Apr 26, 2009 IP
  5. oarcadescript

    oarcadescript Peon

    Messages:
    34
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    put ob_start(); at the top. this is not 'best practice' code, but it works in a pinch. what it does if buffer all output, so the headers go first.

    either put ob_flush(); after you've finished messing with the headers or just leave it and php will clear the buffer at the end of the document.
     
    oarcadescript, Apr 26, 2009 IP
  6. merlinseo

    merlinseo Well-Known Member

    Messages:
    1,686
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    130
    #6
    Can you please check and let me know
    I have copied the code for pluggable.php is found here : http://snipt.org/Ump
     
    merlinseo, Apr 26, 2009 IP