Page 1 of 1

Cannot send session cookie - headers already sent by

Posted: Thu Jan 10, 2013 6:06 am
by Saile
2013-01-10 8:33:12 - PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cookie - headers already sent by (output started at /home/aitmarke/public_html/index.php:49) in /home/aitmarke/public_html/system/library/session.php on line 11
2013-01-10 8:33:12 - PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /home/aitmarke/public_html/index.php:49) in /home/aitmarke/public_html/system/library/session.php on line 11
2013-01-10 8:33:12 - PHP Notice: Undefined index: HTTP_HOST in /home/aitmarke/public_html/index.php on line 177
2013-01-10 8:33:12 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/aitmarke/public_html/index.php:49) in /home/aitmarke/public_html/index.php on line 177
2013-01-10 8:33:12 - PHP Notice: Undefined index: HTTP_HOST in /home/aitmarke/public_html/system/library/currency.php on line 45
2013-01-10 8:33:12 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/aitmarke/public_html/index.php:49) in /home/aitmarke/public_html/system/library/currency.php on line 45
If anyone could help would be appreciated!

I have already restored the original files mentioned in the error log, i changed hosting companys and looked in the file to make sure there are no blank lines before php?

Re: Cannot send session cookie - headers already sent by

Posted: Thu Jan 10, 2013 7:53 am
by Calcite
I have done all that too bar changing host and I have the same errors :(

Re: Cannot send session cookie - headers already sent by

Posted: Thu Jan 10, 2013 7:56 am
by Saile
this is a big problem, common, yet no one knows how to fix...

Re: Cannot send session cookie - headers already sent by

Posted: Fri Jan 11, 2013 6:20 pm
by Calcite
This is one of two problems that are similar.

The other is a similar error "unlink" that refers to cache product pages.

Both fill up my log on a daily basis and no solution that has been suggested in OC forum works

I am sure there are other 1.5.4.1 users experiencing the same problem.

Can anyone help with this?

Re: Cannot send session cookie - headers already sent by

Posted: Tue Jan 22, 2013 3:34 pm
by Saile
still no fix???????

Re: Cannot send session cookie - headers already sent by

Posted: Tue Jan 22, 2013 10:13 pm
by Calcite
Seems everyone is oblivious to this or maybe we are in the minority!

Re: Cannot send session cookie - headers already sent by

Posted: Wed Jan 23, 2013 4:55 am
by victorj
It is not a isolated isseu if you do a google search on it there are tons of this problem.
nice thing is we set up saile site files on my server here in the netherlands and it works like a charm.
i test this site on a daily base by letting a sitemap program crawling it to extension several times and not a single error shows up.
just checked, my servers work on latest version of apache and php so perhaps is is a php issue.

so it might be an idea if any one who has this problem just posts wich php version the server is running and see if this is giving any cleu.

Re: Cannot send session cookie - headers already sent by

Posted: Wed Jan 23, 2013 5:01 am
by Saile
I have a dual environment of 5.2 and 5.3 installed on my server

Is that the latest?

Re: Cannot send session cookie - headers already sent by

Posted: Wed Jan 23, 2013 5:41 am
by victorj
php 5.4.11 is latest version

Re: Cannot send session cookie - headers already sent by

Posted: Wed Jan 23, 2013 5:51 am
by Saile
victorj wrote:php 5.4.11 is latest version
I will have to check with hosting company of they will upgrade it.

Re: Cannot send session cookie - headers already sent by

Posted: Wed Jan 23, 2013 7:46 am
by Calcite
5.3.17 on mine.

Re: Cannot send session cookie - headers already sent by

Posted: Sun Feb 10, 2013 6:12 pm
by milezteg
Umm well this is annoying but am I right to assume that if we turn off PHP Notice/Warnings, then the user will never see it?

Can anyone comment on this? I am seeing this in my logs as well :/

Re: Cannot send session cookie - headers already sent by

Posted: Mon Feb 11, 2013 4:44 am
by Saile
milezteg wrote:Umm well this is annoying but am I right to assume that if we turn off PHP Notice/Warnings, then the user will never see it?

Can anyone comment on this? I am seeing this in my logs as well :/
does that fix it?

I don't want to get to a point where it appears on your actually site. It foes do that if it overfills

Re: Cannot send session cookie - headers already sent by

Posted: Mon Feb 11, 2013 4:51 am
by victorj
in admin server settings you can switch off show error and error logging.
it will not solve the problem but it wont be show on front of site and your logfile wont fill up.

spent numerous hours trying to fix it even copied a comlete site to my server and never could replicate the problem.
since it happens on a great amount of site and not only OC but alsoon wp joomla and many other system it makes me believe it is server related.

Re: Cannot send session cookie - headers already sent by

Posted: Fri May 10, 2013 1:06 am
by kevung
hello,

I am getting the same exact error on 1.5.4.1 and the other php fixes have not solved my issue. The site seems to be running fine, so perhaps this is minor, although it's scary to see the error log fill up =(

Did you guys find any solutions?

Re: Cannot send session cookie - headers already sent by

Posted: Fri May 10, 2013 1:38 am
by butte
Not new, not a mystery. The point of what follows is partly that unlike most software OC is installed and perforce tested on practicably every combination of server hardware, operating systems, and other software that is in use on the planet, with inevitable nuances to reckon with, and that you can readily find same or similar problems plus their solutions using a narrow array of terms in the Search available high right on the forum pages.

If you search cannot send headers" + solved
[EDIT, BAD LINK REPLACED]
then you'll reach "About 2,820,000 results (0.52 seconds)" at
https://www.google.com/search?q=%22cann ... encart.com
and many of those are USABLE.

If you search instead for "headers already sent" + solved
then you'' reach "About 5,430 results (0.36 seconds)" at
http://www.google.com/search?q=%22heade ... encart.com
and many of those are USABLE.