...

View Full Version : Cannot Send Session Cookie Error



eshban
06-22-2005, 10:58 AM
Hi,

My project works well offline, today i upload to a server, but on some pages it gives the following error

session_start(): Cannot send session cookie - headers already sent by (output started at D:\vhosts\abc.com\httpdocs\ant\header1.php:9) in D:\vhosts\abc.com\httpdocs\ant\viewcart.php on line 6

Kindly tell me that how can i solve this issue.

Regards,
Eshban

delinear
06-22-2005, 11:05 AM
That means that on some pages you are sending data to the browser before you try to se the cookie. This isn't allowed, if you send ANY data to the browser, even if you just have one single linebreak or whitespace before your <?php tag then you cannot send headers and this error will be generated.

If the project is working offline but not online, it could be that your host is inserting something which is causing the headers to be sent before your code is executed, or it could be that the error level is set differently in your home and server environments and the error is just being hidden when you try to view the page offline. It's impossible to pinpoint the cause though without seeing some code.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum