+ Reply to Thread
Results 1 to 5 of 5

Thread: Header Output Errors

  1. #1
    jjpeacha is offline x10 Sophmore jjpeacha is an unknown quantity at this point
    Join Date
    Jan 2008
    Posts
    125

    Header Output Errors

    Hiya,

    I've setup a small forum over at animalcrossingforums.com the forums work fine so i decided I wanted a login script on my homepage, and developed it.

    However I keep getting random header errors:

    Warning: Cannot modify header information - headers already sent by (output started at /home/jjpeacha/public_html/animalcrossingforums.com/index.php: in /home/jjpeacha/public_html/animalcrossingforums.com/forums/includes/sessions.php on line 366

    Warning: Cannot modify header information - headers already sent by (output started at /home/jjpeacha/public_html/animalcrossingforums.com/index.php: in /home/jjpeacha/public_html/animalcrossingforums.com/forums/includes/sessions.php on line 367
    or sometimes these:

    Warning: Cannot modify header information - headers already sent by (output started at /home/jjpeacha/public_html/animalcrossingforums.com/index.php: in /home/jjpeacha/public_html/animalcrossingforums.com/forums/includes/sessions.php on line 254

    Warning: Cannot modify header information - headers already sent by (output started at /home/jjpeacha/public_html/animalcrossingforums.com/index.php: in /home/jjpeacha/public_html/animalcrossingforums.com/forums/includes/sessions.php on line 255
    The forum im using is PHPBB 2.0.23 (or summit like tht). When you login the errors go, and when u logout I can't see to get the errors so I don't know whats causing it.

    Thanks in advance!

  2. #2
    marshian's Avatar
    marshian is offline x10 Elder marshian is an unknown quantity at this point
    Join Date
    Jan 2008
    Location
    Belgium
    Posts
    526

    Re: Header Output Errors

    headers have to be the first thing to be send!
    eg.
    PHP Code:
    <?php
    echo "a";
    header("Content-type: text/html");
    ?>
    = fail

    PHP Code:
    <?php
    header
    ("Content-type: text/html");
    echo 
    "a";
    ?>
    = good

    PHP Code:

    <?php
    header
    ("Content-type: text/html");
    echo 
    "a";
    ?>
    = fail (there's an enter before the <?php tag, which is also output)
    Real programmers don't document their code - if it was hard to write, it should be hard to understand.

  3. #3
    Salvatos's Avatar
    Salvatos is offline x10 Lieutenant Salvatos is an unknown quantity at this point
    Join Date
    Jun 2006
    Location
    Québec, Canada
    Posts
    271

    Re: Header Output Errors

    Your website's header may also be colliding with phpBB's one.

  4. #4
    jjpeacha is offline x10 Sophmore jjpeacha is an unknown quantity at this point
    Join Date
    Jan 2008
    Posts
    125

    Re: Header Output Errors

    I can't see that attribute in any of the files mentioned . . .

  5. #5
    Salvatos's Avatar
    Salvatos is offline x10 Lieutenant Salvatos is an unknown quantity at this point
    Join Date
    Jun 2006
    Location
    Québec, Canada
    Posts
    271

    Re: Header Output Errors

    Well login.php (and most main phpBB pages) will call includes/page_header.php, which will in turn call for the template file overall_header.tpl (or in some cases simple_header.tpl), which will set the page header and display it. So if you work from phpBB pages and add your own stuff (headers), both may "collide" at some point. What I usually do is let phpBB output its header and then build my page below that.

    I'm not an expert anyway, and I don't know exactly what you are doing, but maybe this could help you: http://www.phpbb.com/kb/article/coding-new-pages/
    And more precisely this: http://www.phpbb.com/kb/article/phpb...s-integration/

+ Reply to Thread

Similar Threads

  1. Header Location Problem
    By xevell in forum Free Hosting
    Replies: 7
    Last Post: 07-15-2008, 09:28 PM
  2. php errors galore
    By DMG Online in forum Scripts & 3rd Party Apps
    Replies: 9
    Last Post: 05-17-2008, 06:23 AM
  3. domain available again
    By Uchiha Sasuke in forum Free Hosting
    Replies: 17
    Last Post: 03-06-2008, 01:34 PM
  4. cant access website
    By Uchiha Sasuke in forum Free Hosting
    Replies: 5
    Last Post: 02-28-2008, 02:08 PM
  5. HELP! Windows Filesystem Errors
    By Sup3rkirby in forum Computers & Technology
    Replies: 2
    Last Post: 12-22-2007, 03:22 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers