Jump to content

why can I not session_start()


astralaaron

Recommended Posts

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

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

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
u have to have it before the html.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...