Kingy Posted February 26, 2008 Share Posted February 26, 2008 ive read the sticky and neither correction fixes this problem Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by my file starts <?php ob_start(); session_start(); ?> why am i still recieving this error Quote Link to comment Share on other sites More sharing options...
DarkerAngel Posted February 26, 2008 Share Posted February 26, 2008 Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by usually that line ends in a file name and a line number.... Quote Link to comment Share on other sites More sharing options...
Kingy Posted February 26, 2008 Author Share Posted February 26, 2008 yes.. index.php and line 3.. exactly where session_start is Quote Link to comment Share on other sites More sharing options...
trq Posted February 26, 2008 Share Posted February 26, 2008 You must have output (usually white space) outside of the <?php ?> tags. Quote Link to comment Share on other sites More sharing options...
DarkerAngel Posted February 26, 2008 Share Posted February 26, 2008 ob_start(); sends header information thats why. and what use is this for? Quote Link to comment Share on other sites More sharing options...
trq Posted February 26, 2008 Share Posted February 26, 2008 ob_start(); sends header information thats why. and what use is this for? ob_start() does not send any headers. It creates a buffer for output to go into, untill that buffer is sent no headers (or output) will be sent either. Output buffering is often used as a hack around header errors. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted February 26, 2008 Share Posted February 26, 2008 The error message contains information about where the output occurred in addition to what code could not output headers. By just posting bits and pieces of the error, just means that it will take a really long time to give you a direct answer that solves your problem. If you are not going to read what the error message states and try to figure out the problem yourself, then you must post the entire error message if you want someone else to help you. xxxxx out any sensitive information such as account/domain name in the file paths if you don't want that information posted. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.