astralaaron Posted January 28, 2008 Share Posted January 28, 2008 i can't put session_start() on the top of any of my pages without an error coming upWarning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\wamp\www\siteb\member\login.php:2) in C:\wamp\www\siteb\member\login.php on line 3Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\wamp\www\siteb\member\login.php:2) in C:\wamp\www\siteb\member\login.php on line 3 Link to comment Share on other sites More sharing options...
astralaaron Posted January 28, 2008 Author Share Posted January 28, 2008 it was because i had <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">infront of the session_start(); Link to comment Share on other sites More sharing options...
Synook Posted January 28, 2008 Share Posted January 28, 2008 Yep - you have to send all headers before you output anything - even a space before the <?php tag will mess it up. Link to comment Share on other sites More sharing options...
kishou Posted January 28, 2008 Share Posted January 28, 2008 i can't put session_start() on the top of any of my pages without an error coming upWarning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\wamp\www\siteb\member\login.php:2) in C:\wamp\www\siteb\member\login.php on line 3Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\wamp\www\siteb\member\login.php:2) in C:\wamp\www\siteb\member\login.php on line 3u have to have it before the html. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.