Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Location
    Oregon, United States of America
    Posts
    882
    Thanks
    1
    Thanked 9 Times in 9 Posts

    Header Sent Error, Session Start IS at top

    This is what i have at the very top of the page.
    PHP Code:
    <?php
    session_start
    ();
    header("Cache-control: private");
    ?>
    Putting this code at the very very top of the page has fixed my problem of getting the error:
    Warning: session_start(): Cannot send session cookie - headers already sent by ~~~~~~

    I have checked, and made sure there isn't a second session start or anything of that kind on the page. The only thing that deals with sessions is something like:

    PHP Code:
    $Blah $_SESSION['BlahBlah']; 
    What can i do to get rid of this?
    If I'm postin here, I NEED YOUR HELP!!

  • #2
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Is the 'problem' (whatever is was) fixed, or did you make a typo?

    is suppose your problem (if any) would be caused by the third line (header(...))
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •