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 Link to comment https://forums.phpfreaks.com/topic/93049-header-problems/ 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.... Link to comment https://forums.phpfreaks.com/topic/93049-header-problems/#findComment-476699 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 Link to comment https://forums.phpfreaks.com/topic/93049-header-problems/#findComment-476706 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. Link to comment https://forums.phpfreaks.com/topic/93049-header-problems/#findComment-476708 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? Link to comment https://forums.phpfreaks.com/topic/93049-header-problems/#findComment-476711 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. Link to comment https://forums.phpfreaks.com/topic/93049-header-problems/#findComment-476713 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. Link to comment https://forums.phpfreaks.com/topic/93049-header-problems/#findComment-476847 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.