Probably 1)You do echo before session_start() 2)You have white space before the opening <?php tag
The problem is in that that the server had sent some output to the browser and after that you want to sent a header - the session cookie. No output must appear before all headers are sent. You can suppres echo's to be sent to the browser with ob_start() as the furst instructuion in the Php, and ob_end() after the last header is sent. Regards, Andrey Hristov ----- Original Message ----- From: "Mark Chin, Apoll Displays" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 10, 2002 11:00 PM Subject: [PHP] session related > i can't use session, give me an error when use ie 6. > > Warning: Cannot send session cookie - headers already sent by (output > started at /home/www.apollodisplays.com/public_html/mainpage.php:10) in > /home/www.apollodisplays.com/public_html/mainpage.php on line 29 > > Warning: Cannot send session cache limiter - headers already sent > (output started t > /home/www.apollodisplays.com/public_html/mainpage.php:10) in > /home/www.apollodisplays.com/public_html/mainpage.php on line 29 > > > my code is very simple. see below ----> > > session_start(); > session_register("userright"); > $HTTP_SESSION_VARS["userright"]=$right; > > anyone have any idea ? thankx > > > > > _____ > > Mark Chin <mailto:[EMAIL PROTECTED]> > Apollo Display Technologies, LLC > 85 Remington Blvd. Ronkonkoma, NY 11779 > Ph. (631) 580-4360 EXT 19 > Fax (631) 580-4370 > http://www.apollodisplays.com > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]