new_php85 Posted September 19, 2008 Share Posted September 19, 2008 why the system that i develop can run at my pc but after put on server i have this warning Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/XXXXX/public_html/XXXXXClaim/db_connect.php:10) in /home/XXXXX/public_html/XXXXX/index.php on line 3 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/XXXXX/public_html/XXXXXClaim/db_connect.php:10) in /home/XXXXX/public_html/XXXXXClaim/index.php on line 3 i already go to a forum that have same problem but it still not working this is link for the forum http://www.php-forum.com/phpforum/viewtopic.php?f=2&t=9229 Quote Link to comment https://forums.phpfreaks.com/topic/124882-solved-why-session_start-functionsession-start-cannot-send-session-cookie/ Share on other sites More sharing options...
.josh Posted September 19, 2008 Share Posted September 19, 2008 The short answer is that you cannot output anything before setting a cookie or starting a session, not even whitespace, unless you use ob_start()/ob_flush() which isn't really advisable. Quote Link to comment https://forums.phpfreaks.com/topic/124882-solved-why-session_start-functionsession-start-cannot-send-session-cookie/#findComment-645325 Share on other sites More sharing options...
Maq Posted September 19, 2008 Share Posted September 19, 2008 Post the code for this error. 99% of the time, the root of this problem is what CV said... Quote Link to comment https://forums.phpfreaks.com/topic/124882-solved-why-session_start-functionsession-start-cannot-send-session-cookie/#findComment-645348 Share on other sites More sharing options...
new_php85 Posted September 19, 2008 Author Share Posted September 19, 2008 The short answer is that you cannot output anything before setting a cookie or starting a session, not even whitespace, unless you use ob_start()/ob_flush() which isn't really advisable. yes there some whitespace at my code. i have change my code and now the warning disappear. ;)thank for help Quote Link to comment https://forums.phpfreaks.com/topic/124882-solved-why-session_start-functionsession-start-cannot-send-session-cookie/#findComment-645358 Share on other sites More sharing options...
Maq Posted September 19, 2008 Share Posted September 19, 2008 I think there is a sticky on this too Quote Link to comment https://forums.phpfreaks.com/topic/124882-solved-why-session_start-functionsession-start-cannot-send-session-cookie/#findComment-645360 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.