Results 1 to 5 of 5

Thread: Cannot modify header information - headers already sent by

  1. #1
    Join Date
    Nov 2009
    Posts
    37

    Cannot modify header information - headers already sent by

    I have a
    [phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /site/index.php:5)
    on www.mydomain.com

    Here are the top of the page:

    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
    <head>
    <?php define('IN_PHPBB', true);
    $phpbb_root_path = './../';
    $phpEx = substr(strrchr(__FILE__, '.'), 1);
    include($phpbb_root_path . 'common.' . $phpEx);
    $user->session_begin();
    $auth->acl($user->data);
    $user->setup('');
    ?>
      <title>Official Website of Circle Lay Houdain - CLH Basketball</title>
    What to do?

  2. #2
    Join Date
    Nov 2008
    Posts
    1,192

    Re: Cannot modify header information - headers already sent by

    The error you reported that you can access the http headers (as heard in the management of the session) because you've already started writing a response to the client.

    it mean that your

    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
    <head>
    can not be before your session_begin. you must put it after:

    PHP Code:
        <?php define('IN_PHPBB'true);
        
    $phpbb_root_path './../';
        
    $phpEx substr(strrchr(__FILE__'.'), 1);
        include(
    $phpbb_root_path 'common.' $phpEx);
        
    $user->session_begin();
        
    $auth->acl($user->data);
        
    $user->setup('');
        
    ?>
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
        <head>
         <title>Official Website of Circle Lay Houdain - CLH Basketball</title>

  3. #3
    Join Date
    Nov 2009
    Posts
    37

    Re: Cannot modify header information - headers already sent by

    When I put my
    PHP Code:
    <?php define('IN_PHPBB'true);
    $phpbb_root_path './../';
    $phpEx substr(strrchr(__FILE__'.'), 1);
    include(
    $phpbb_root_path 'common.' $phpEx);
    $user->session_begin();
    $auth->acl($user->data);
    $user->setup('');
    ?>
    before the head, the code disappears.

  4. #4
    Join Date
    Nov 2008
    Posts
    1,192

    Re: Cannot modify header information - headers already sent by

    What code? You mean the source code of your page? It's just the principle of a server language. If appeared, it becomes a client language.

  5. #5
    Join Date
    Nov 2009
    Posts
    37

    Re: Cannot modify header information - headers already sent by

    What I mean is that when I put the code previously mentioned before:
    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
    <head>
    and I save the file with the page editor, php code defined disappears.

Similar Threads

  1. Connect USB 3.0 front case panel header to motherboard w/o a header?
    By Dogs-Day-Out in forum Motherboard Processor & RAM
    Replies: 4
    Last Post: 14-04-2012, 07:02 PM
  2. Correct the FPS information in MP4 H.264 header
    By Innocent User in forum Windows Software
    Replies: 5
    Last Post: 05-03-2011, 10:15 AM
  3. Allow users to modify their information
    By Chad Gross in forum Active Directory
    Replies: 2
    Last Post: 14-07-2010, 06:57 PM
  4. How to modify user information in Windows XP ?
    By Basaam in forum Operating Systems
    Replies: 3
    Last Post: 27-07-2009, 12:39 PM
  5. IIS7: Add expires header or cache-control header
    By quota in forum Software Development
    Replies: 3
    Last Post: 06-06-2009, 07:45 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,727,214,196.70366 seconds with 17 queries