need help

Discussion in 'Programming' started by bizpro99, Aug 15, 2006.

  1. #1
    Not sure if this is in the right forum?

    Anyway Im not sure what happened but when I try to login into one of sites I get this error:


    Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/myspace2/public_html/index.php:2) in /home/myspace2/public_html/plugins/admin/admin_entrance.php on line 4

    Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/myspace2/public_html/index.php:2) in /home/myspace2/public_html/plugins/admin/admin_entrance.php on line 4

    Warning: Cannot modify header information - headers already sent by (output started at /home/myspace2/public_html/index.php:2) in /home/myspace2/public_html/plugins/admin/admin_entrance.php on line 17


    Any suggestions?
     
    bizpro99, Aug 15, 2006 IP
  2. decepti0n

    decepti0n Peon

    Messages:
    519
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You have to put session_start() at the very super ultra top of your script, right after the <?php tag, and if there isn't one, make it.

    header() can only be used before any output is made, basically meaning before the <html> tag..same with some other functions.
     
    decepti0n, Aug 16, 2006 IP
  3. knopix

    knopix Peon

    Messages:
    122
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    yeah, it seems like you're trying to redirect or change content type. can you post some of the code?
     
    knopix, Aug 16, 2006 IP
  4. bizpro99

    bizpro99 Active Member

    Messages:
    901
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    90
    #4
    its fixed.

    Thanks guys.
     
    bizpro99, Aug 16, 2006 IP