Jump to content

[SOLVED] why session_start() [function.session-start]: Cannot send session cookie ???


new_php85

Recommended Posts

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

 

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  :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.