Page 1 of 2

[SOLVED] - headers already sent

Posted: Sun Jan 01, 2012 9:24 am
by s3cure
I downloaded the latest OC 1.5.3. Using WAMP I set up and run my website on my local machine and now I have uploaded the files to the actual host, configured DB and updated config.php files with the correct info. However when I try to access my website using the temporary URL, the website works but I see the following error message at the top:

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/beautyst/public_html/config.php:47) in /home/beautyst/public_html/system/library/session.php on line 11Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/beautyst/public_html/config.php:47) in /home/beautyst/public_html/system/library/session.php on line 11Warning: Cannot modify header information - headers already sent by (output started at /home/beautyst/public_html/config.php:47) in /home/beautyst/public_html/index.php on line 175Warning: Cannot modify header information - headers already sent by (output started at /home/beautyst/public_html/config.php:47) in /home/beautyst/public_html/system/library/currency.php on line 45


Any idea why this is happening and how to solve it? thanks

Re: Error Cannot send session cookie - headers already sent

Posted: Sun Jan 01, 2012 10:05 am
by straightlight
s3cure wrote:I downloaded the latest OC 1.5.3. Using WAMP I set up and run my website on my local machine and now I have uploaded the files to the actual host, configured DB and updated config.php files with the correct info. However when I try to access my website using the temporary URL, the website works but I see the following error message at the top:

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/beautyst/public_html/config.php:47) in /home/beautyst/public_html/system/library/session.php on line 11Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/beautyst/public_html/config.php:47) in /home/beautyst/public_html/system/library/session.php on line 11Warning: Cannot modify header information - headers already sent by (output started at /home/beautyst/public_html/config.php:47) in /home/beautyst/public_html/index.php on line 175Warning: Cannot modify header information - headers already sent by (output started at /home/beautyst/public_html/config.php:47) in /home/beautyst/public_html/system/library/currency.php on line 45


Any idea why this is happening and how to solve it? thanks
Make sure there are no white space and if you work under Notepad then to save as ANSI and not as plain text since OpenCart is obfuscated on UTF-8 which some file editors may not properly save the files under this structure - depending on which file editor the file has also been saved if not notepad. I, myself personally, use Notepad++ Free Edition as I never encounter these problems. :)

Re: Error Cannot send session cookie - headers already sent

Posted: Sun Jan 01, 2012 6:16 pm
by s3cure
Thank you straightlight. There were some empty lines at the end and I used a different editor this time and it worked.

Re: [SOLVED] - headers already sent

Posted: Thu Jan 12, 2012 8:26 pm
by shiokguy
I have the same issue just happen today: -

Code: Select all

Warning: session_start() [function.session-start]: open(/tmp/sess_d6af75741641d28c1d9055e10706d04c, O_RDWR) failed: No space left on device (28) in /home/dolcehou/public_html/shop/system/library/session.php on line 11Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/dolcehou/public_html/shop/index.php:100) in /home/dolcehou/public_html/shop/system/library/session.php on line 11Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/dolcehou/public_html/shop/index.php:100) in /home/dolcehou/public_html/shop/system/library/session.php on line 11Warning: Cannot modify header information - headers already sent by (output started at /home/dolcehou/public_html/shop/index.php:100) in /home/dolcehou/public_html/shop/system/engine/controller.php on line 28Warning: Cannot modify header information - headers already sent by (output started at /home/dolcehou/public_html/shop/index.php:100) in /home/dolcehou/public_html/shop/system/engine/controller.php on line 29
Fatal error: Call to a member function get() on a non-object in /home/dolcehou/public_html/shop/index.php on line 99
The above error after I try to logon in the front end

Regards
SHiok guy

Re: [SOLVED] - headers already sent

Posted: Thu Jan 12, 2012 8:27 pm
by shiokguy
This is what I get when I logon at the backend: -

Code: Select all

Warning: session_start() [function.session-start]: open(/tmp/sess_7582ee5c7f232eefc2568a7936497d6d, O_RDWR) failed: No space left on device (28) in /home/dolcehou/public_html/shop/system/library/session.php on line 11Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/dolcehou/public_html/shop/admin/index.php:79) in /home/dolcehou/public_html/shop/system/library/session.php on line 11Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/dolcehou/public_html/shop/admin/index.php:79) in /home/dolcehou/public_html/shop/system/library/session.php on line 11Warning: Cannot modify header information - headers already sent by (output started at /home/dolcehou/public_html/shop/admin/index.php:79) in /home/dolcehou/public_html/shop/system/engine/controller.php on line 28Warning: Cannot modify header information - headers already sent by (output started at /home/dolcehou/public_html/shop/admin/index.php:79) in /home/dolcehou/public_html/shop/system/engine/controller.php on line 29
Fatal error: Call to a member function get() on a non-object in /home/dolcehou/public_html/shop/admin/index.php on line 78
Can someone help please...

Regards
SHiok Guy

Re: [SOLVED] - headers already sent

Posted: Thu Jan 12, 2012 9:32 pm
by straightlight
No space left on device
This is what the error above states. Contact your host to resolve this issue.

Re: [SOLVED] - headers already sent

Posted: Wed Jan 18, 2012 10:33 pm
by dan74mm

Code: Select all

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/XXXXX/public_html/index.php:100) in /home/XXXXX/public_html/system/library/session.php on line 11
How can I solve this problem? Thank's.

Re: [SOLVED] - headers already sent

Posted: Thu Jan 19, 2012 9:31 pm
by joevagus
@ s3cure what files did you edit and were on the files did you edit im having the same problem

Re: [SOLVED] - headers already sent

Posted: Tue Jan 24, 2012 6:11 am
by shimapi
I work with CODA over Mac... I have my developing version over MAMP.

When I switch from Spanish to English and viceversa, the problem happen.

Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/v15131/catalog/language/spanish/common/header.php:1) in /Applications/MAMP/htdocs/v15131/vqmod/vqcache/vq2-system_engine_controller.php on line 28Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/v15131/catalog/language/spanish/common/header.php:1) in /Applications/MAMP/htdocs/v15131/vqmod/vqcache/vq2-system_engine_controller.php on line 29

How can I know if I am saving on ANSI format?

Thanks ??? ,
Shirley.

Re: [SOLVED] - headers already sent

Posted: Thu Jan 26, 2012 4:47 am
by straightlight
How can I know if I am saving on ANSI format?
Save the file with Notepad++ and re-upload to your FTP server in ASCII mode - not binary.

Re: [SOLVED] - headers already sent

Posted: Tue May 22, 2012 5:50 pm
by jiak
I have some similar problems, as I tried to clone an opencart install to a new domain. What I did was copy the files (with tar), import the database and change config.php and admin/config.php to reflect the new domain.

The front end works but with errors

Code: Select all

Notice: unserialize() [function.unserialize]: Error at offset 160 of 199 bytes in /home/public_html/opencart/index.php on line 61

Notice: unserialize() [function.unserialize]: Error at offset 111 of 277 bytes in /home/public_html/opencart/index.php on line 61
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/public_html/opencart/index.php:61) in /home/public_html/opencart/system/library/session.php on line 11Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/public_html/opencart/index.php:61) in /home/public_html/opencart/system/library/session.php on line 11Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/opencart/index.php:61) in /home/public_html/opencart/index.php on line 173Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/opencart/index.php:61) in /home/public_html/opencart/system/library/currency.php on line 45
I can't log in to the admin.

Code: Select all

Notice: unserialize() [function.unserialize]: Error at offset 160 of 199 bytes in /home/public_html/opencart/admin/index.php on line 45

Notice: unserialize() [function.unserialize]: Error at offset 111 of 277 bytes in /home/public_html/opencart/admin/index.php on line 45
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/public_html/opencart/admin/index.php:45) in /home/public_html/opencart/system/library/session.php on line 11Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/public_html/opencart/admin/index.php:45) in /home/public_html/opencart/system/library/session.php on line 11Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/opencart/admin/index.php:45) in /home/public_html/opencart/system/library/currency.php on line 45Notice: unserialize() [function.unserialize]: Error at offset 869 of 6951 bytes in /home/public_html/opencart/system/library/user.php on line 47Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/opencart/admin/index.php:45) in /home/public_html/opencart/system/engine/controller.php on line 28Warning: Cannot modify header information - headers already sent by (output started at /home/public_html/opencart/admin/index.php:45) in /home/public_html/opencart/system/engine/controller.php on line 29
Any ideas?

Re: [SOLVED] - headers already sent

Posted: Tue May 29, 2012 2:16 am
by MZBS
What about this? v. 1.5.2.1
2012-05-28 18:06:41 - PHP Warning: unlink(/hermes/waloraweb033/b414/moo.herziostorecom/volvooceanrace/system/cache/cache.product.1.0.8.1d30f8d0ed5b411aea54d475069bae0d.1338228398) [<a href='function.unlink'>function.unlink</a>]: No such file or directory in /hermes/waloraweb033/b414/moo.herziostorecom/volvooceanrace/system/library/cache.php on line 14
2012-05-28 18:06:43 - PHP Warning: session_start() [<a href='function.session-start'>function.session-start</a>]: Cannot send session cache limiter - headers already sent (output started at /hermes/waloraweb033/b414/moo.herziostorecom/volvooceanrace/index.php:104) in /hermes/waloraweb033/b414/moo.herziostorecom/volvooceanrace/system/library/session.php on line 11

Re: [SOLVED] - headers already sent

Posted: Mon Jul 02, 2012 4:11 pm
by marlin.nl
Hi ,

I saw you're reaction and i found notepad++
On my php files as shown in the image there are more than one space, it looks like a tab?
php-fout.jpg

Looks like tab - php-fout.jpg (70.52 KiB) Viewed 77913 times

I recive the following errors:
2012-07-02 7:15:17 - 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/***/public_html/index.php:45) in /home/***/public_html/system/library/session.php on line 11

2012-07-02 7:15:17 - 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/***/public_html/index.php:45) in /home/***/public_html/system/library/session.php on line 11

2012-07-02 7:15:17 - PHP Notice: Undefined index: HTTP_HOST in /home/***/public_html/index.php on line 175

2012-07-02 7:15:17 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/***/public_html/index.php:45) in /home/***/public_html/index.php on line 175

2012-07-02 7:15:17 - PHP Notice: Undefined index: HTTP_HOST in /home/***/public_html/system/library/currency.php on line 45

2012-07-02 7:15:17 - PHP Warning: Cannot modify header information - headers already sent by (output started at /home/***/public_html/index.php:45) in /home/***/public_html/system/library/currency.php on line 45

Do i understand that all the empty spaces and tabs at the end of a line are making the error?
I hope for a answer on this :-[
We use oc 1.5.1

Kind regards Linda

Re: [SOLVED] - headers already sent

Posted: Mon Jul 02, 2012 6:18 pm
by straightlight
No. Normally, spaces should really matter before:

Code: Select all

<?php
and / or after:

Code: Select all

?>
By assuring you have no spaces on those two instances, upload your index.php file in ASCII mode from FTP and see if the errors persists.

Re: [SOLVED] - headers already sent

Posted: Sat Aug 11, 2012 2:33 am
by marlin.nl
Thanks for you're answer straightlight.

But i have no luck this time :'(
Those errors keep popping up every time i take a look in the admin of oc.

Wonder what could make this such a bigg problem :D

Re: [SOLVED] - headers already sent

Posted: Tue Sep 11, 2012 10:21 pm
by eric.ag2i
I fixed the session error by removing the php.ini from the root directory (and also remove the 2nd from the admin dir).
It fixed the warnings ;)

Re: [SOLVED] - headers already sent

Posted: Wed Sep 12, 2012 1:36 am
by straightlight
Thanks for the heads up.

Re: [SOLVED] - headers already sent

Posted: Mon Dec 31, 2012 6:16 am
by Saile
i am now getting the same issue, any fix?

Re: [SOLVED] - headers already sent

Posted: Mon Dec 31, 2012 6:20 am
by straightlight
Have you followed the suggestion from eric.ag2i above ?

Re: [SOLVED] - headers already sent

Posted: Mon Dec 31, 2012 8:30 am
by Saile
straightlight wrote:Have you followed the suggestion from eric.ag2i above ?
yes i did but still the issue remains.