Need help with weird session_start() error

Discussion in 'PHP' started by Imozeb, Apr 23, 2010.

  1. #1
    I triple checked my code and I don't have a clue where I went wrong. Mabye someone had a similar glitch? I am trying to use session_start() to start a session but everytime I use it anywhere it gives me an error?

    It says that the session has already been started and then it states that the line that the session started is on the same line that the I am using it is on!!! :confused: It even says this twice and there is not loop command! :confused:

    Please help!!!
    (I don't know why it would be referencing the same line that the session_start is on?!?! :confused:)
     
    Imozeb, Apr 23, 2010 IP
  2. Sapphiro

    Sapphiro Well-Known Member

    Messages:
    1,242
    Likes Received:
    61
    Best Answers:
    0
    Trophy Points:
    175
    #2
    You must place that statement as the first line of php code in your page. :)
     
    Sapphiro, Apr 23, 2010 IP
  3. pakistanvoices

    pakistanvoices Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Try to include the session_start() as very first line of your project or it should be the first line of your index.php. I hope it will work fine for you.
     
    pakistanvoices, Apr 24, 2010 IP