Forum Moderators: coopster
function setUpSession($username){
session_start();
if (!isset($_SESSION['username'])) {
$_SESSION['username'] = $username;
}
}
The above code is included via another file, but including it in the page makes no difference, I still get the below errors.
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /usr/home/site/www/htdocs/join/index.php:33) in /usr/home/site/www/htdocs/classes/clsSession.php on line 50
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /usr/home/site/www/htdocs/join/index.php:33) in /usr/home/site/www/htdocs/classes/clsSession.php on line 50
clsSession is where the session_start function is. Line 33 in the index.php file is where the </head> tag closes. From all my reading everyone says it is a white space issue after a php tag somewhere. I even checked my php configuration file, and that seemed ok to. I am lost as to what this issue is, if it is not a whitespace issue, then what is it? Can someone please help.
Thanks in advance.