error in code

Discussion in 'PHP' started by mahiraj, Nov 19, 2007.

  1. #1
    Hi All,

    I am using session in my code.
    i am initializing value in a session variable. And retreating that value in another page so i have found that warning message.
    please help me to eliminate it..
    message is


    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\Program Files\wamp\www\Myworldphone\basket.php:2) in C:\Program Files\wamp\www\Myworldphone\basket.php on line 3
     
    mahiraj, Nov 19, 2007 IP
  2. kreoton

    kreoton Peon

    Messages:
    229
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    use session_start before any (html or plain text) output
     
    kreoton, Nov 19, 2007 IP
  3. mahiraj

    mahiraj Guest

    Messages:
    47
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I am already using it before html text
     
    mahiraj, Nov 19, 2007 IP
  4. kreoton

    kreoton Peon

    Messages:
    229
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    check for white spaces or maybe there is a UTF-8 secret char (i don't remember how it is called)
     
    kreoton, Nov 19, 2007 IP
  5. aRo`

    aRo` Peon

    Messages:
    141
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    i also did waste my time on this error in combination with whitespaces.

    why not use a PHP debugger ?
     
    aRo`, Nov 19, 2007 IP
  6. TwistMyArm

    TwistMyArm Peon

    Messages:
    931
    Likes Received:
    44
    Best Answers:
    0
    Trophy Points:
    0
    #6
    How about you copy up basket.php so we can see what's on line 2 (which is where the output is occurring, apparently)?
     
    TwistMyArm, Nov 19, 2007 IP