zachtuggle Posted April 10, 2011 Share Posted April 10, 2011 It is my understanding that <?php session_start (); ?> must go on the very first line otherwise "it won't work." But mine still isn't working, and I'm not sure why. These errors were returned EVEN AFTER I deleted everything in index.php except <? session_start (); ?>.... Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/xxx/public_html/xxx/xxx/index.php:1) in /home/xxx/public_html/xxx/xxx/index.php on line 1 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/xxx/public_html/xxx/xxx/index.php:1) in /home/xxx/public_html/xxx/xxx/index.php on line 1 Quote Link to comment https://forums.phpfreaks.com/topic/233295-session-error/ Share on other sites More sharing options...
Pikachu2000 Posted April 10, 2011 Share Posted April 10, 2011 You probably have a byte order mark, or BOM in the file. In your editor (and if you're using Notepad, you may want to consider using something else), open the file and resave it as UTF8 without BOM. Quote Link to comment https://forums.phpfreaks.com/topic/233295-session-error/#findComment-1199760 Share on other sites More sharing options...
zachtuggle Posted April 10, 2011 Author Share Posted April 10, 2011 Incredible. Thank you very much. I use Dreamweaver, and found a check box in the Page Properties for BOM. It now works just fine! Quote Link to comment https://forums.phpfreaks.com/topic/233295-session-error/#findComment-1199763 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.