Results 1 to 3 of 3

Thread: Session killing

  1. #1
    Join Date
    Mar 2004
    Posts
    42

    Unhappy Unanswered: Session killing

    Hi,

    For my website im trying to create a log in page to people can administer a database. I keep recieving this lovely message and am a little stuck on what to do with it. I have changed the connection to NConnect so it will kill any previous connections. I have also cleared all cookies, cache and history from the pc. I have no idea. Any help or guidence would be awesome cheers.

    Here's the error message.

    Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /study/comp/c3015507/webpages/site/loginaction.php:8) in /study/comp/c3015507/webpages/site/loginaction.php on line 11

    Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /study/comp/c3015507/webpages/site/loginaction.php:8) in /study/comp/c3015507/webpages/site/loginaction.php on line 11

    Warning: Cannot modify header information - headers already sent by (output started at /study/comp/c3015507/webpages/site/loginaction.php:8) in /study/comp/c3015507/webpages/site/loginaction.php on line 32

  2. #2
    Join Date
    Mar 2004
    Posts
    17

    Talking Sessions

    put your session headers above any html tags. this means that session_start should be placed before the "<html>" tag. Also, functions are not an exception here. If you've included a function that contains html tags, you would get the same error. A word of advise, put your session header above all your codes as much as possible.
    What? Can't move without me?

  3. #3
    Join Date
    Mar 2004
    Posts
    17

    Talking

    Quote Originally Posted by Deviruchi
    put your session headers above any html tags. this means that session_start should be placed before the "<html>" tag. Also, functions are not an exception here. If you've included a function that contains html tags, you would get the same error. A word of advise, put your session header above all your codes as much as possible.

    i forgot, session functions can be placed in a middle of the code, as long as it is not placed after any code that prints on the page(eg. echo, print). print bfore exit function not included.
    What? Can't move without me?

Posting Permissions

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