Hi,
Why am I getting error if try to use session_start();
thanks.
session variable
Moderator: General Moderators
Re: session variable
What's the error message?
Re: session variable
Hi,
Thanks. The error is like this
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /users/mlahon1/chap01/useractivepreviewtmp369.php3:6) in
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /users/mlahon1/chap01/useractivepreviewtmp369.php3:6) in
Thanks. The error is like this
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /users/mlahon1/chap01/useractivepreviewtmp369.php3:6) in
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /users/mlahon1/chap01/useractivepreviewtmp369.php3:6) in
Re: session variable
session_start() needs to be at the very top of your page, before anything is output to the browser. For example,
Code: Select all
<?php
session_start();
// Put everything else below this comment
Re: session variable
Hi,
Thanks.
I put the session_start() at the very beginning. But still getting the error like this
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /users/mlahon1/chap01/useractivepreviewtmp378.php3:6) in /users/mlahon1/chap01/useractivepreviewtmp378.php3 on line 8
Thanks.
I put the session_start() at the very beginning. But still getting the error like this
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /users/mlahon1/chap01/useractivepreviewtmp378.php3:6) in /users/mlahon1/chap01/useractivepreviewtmp378.php3 on line 8