Jump to content

why can I not session_start()


astralaaron
 Share

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...