Advertisement

Cannot send session cookie - headers already sent

General questions relating to Joomla! There are other boards for more specific help on Joomla! features and extensions.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
cigsmh
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Mon Jun 18, 2007 7:42 pm

Cannot send session cookie - headers already sent

Post by cigsmh » Sun Mar 02, 2008 1:38 am

Hi All,

My remository component doesn't work properly and as I was told it has something to do with cookies.
Recently I saw the following warnings on my Remository admin page, and I hope that you guys can tell me what is going on with my cookies.


Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/handyman/public_html/includes/joomla.php:4148) in /home/handyman/public_html/includes/joomla.php on line 800

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/handyman/public_html/includes/joomla.php:4148) in /home/handyman/public_html/includes/joomla.php on line 800

Thank you,

Igor
Last edited by toivo on Thu Jun 21, 2018 12:56 pm, edited 1 time in total.
Reason: mod note: locked topic

Advertisement
dragonrider
Joomla! Ace
Joomla! Ace
Posts: 1070
Joined: Mon Aug 22, 2005 7:53 pm
Location: Ilkley, West Yorkshire, UK
Contact:

Re: Cannot send session cookie - headers already sent

Post by dragonrider » Sun Mar 02, 2008 8:10 am

You've an extra blank line on a php file that you've edited recently, possibly includes/joomla.php, but not necessarily.

If you've edited a php file, config or a remos file perhaps laterly, load it into an editor and see if there is a blank line either before the <?PHP or after the final ?> at the bottom of the page.

Some website editors do like to add an extra blank line each time you edit a php file in them!

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 20661
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ Germany/ S'pore/Bogor/ North America
Contact:

Re: Cannot send session cookie - headers already sent

Post by leolam » Sun Mar 02, 2008 10:47 am

have you modified your system so it does not show any more globals=on?

please check for any blank lines at the end of your globals.php file and if so remove those

Leo
Joomla's #1 Professional Services Provider:
#Joomla Professional Support: https://gws-desk.com -
#Joomla Specialized Hosting Solutions: https://gws-host.com -

cigsmh
Joomla! Apprentice
Joomla! Apprentice
Posts: 22
Joined: Mon Jun 18, 2007 7:42 pm

Re: Cannot send session cookie - headers already sent

Post by cigsmh » Sun Mar 02, 2008 8:55 pm

Thanks a lot. I will find the problem after your help

User avatar
farmerdon
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 110
Joined: Thu Oct 18, 2007 10:35 pm
Location: Cork
Contact:

Re: Cannot send session cookie - headers already sent

Post by farmerdon » Tue Mar 11, 2008 6:18 pm

I was struggling with the above problem today.

I deleted the blank line at the end of my globals.php and everything is grand now.

Thanks for the post.

vijaip
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Sep 08, 2007 8:41 pm

Re: Cannot send session cookie - headers already sent

Post by vijaip » Fri Mar 28, 2008 5:08 pm

I had this problem as well..Don't know if this will help. I was getting an intermediate page with an error between index.php and index2.php. It appears for only a few seconds ..So I took a screen shot of it..It referenced an error in class.phpmailer.php.

I fixed it by removing trailing empty lines in /includes/phpmailer/class.phpmailer.php and /includes/phpmailer/class.smtp.php

I also did the bit about placing the php.ini file in the root joomla folder and the administrator folder
see here for more info.
http://forum.joomla.org/viewtopic.php?f=34&t=269563

lima_fil
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Wed Jul 02, 2008 11:30 pm
Location: Belgrade
Contact:

Re: Cannot send session cookie - headers already sent

Post by lima_fil » Tue Jul 15, 2008 11:33 pm

Just fix it.
I saved php file (edited with notepad) in ANSI format, not UTF-8 which was default.
SO if you dont have an extra blank line, you should try this one.
Pozzdrav
:::strašan je to zanat:::
http://web.kulturban.org

jokmok
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Sat Aug 23, 2008 9:08 pm

Re: Cannot send session cookie - headers already sent

Post by jokmok » Thu Sep 04, 2008 8:57 pm

A late post in this thread just to confirm that saving with Notepad using ANSI format as described above actually does help.

Thanks for the hint - it drove me nuts.
Jokmok

adde1966
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Mar 04, 2009 6:12 pm

Re: Cannot send session cookie - headers already sent

Post by adde1966 » Wed Mar 04, 2009 6:55 pm

-----------------------------------------------

JonasJoomla
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 216
Joined: Fri Sep 22, 2006 9:11 am

Re: Cannot send session cookie - headers already sent

Post by JonasJoomla » Fri Apr 17, 2009 8:24 am

Att ändra till Ansi funkade pefekt

User avatar
hopekiah
Joomla! Apprentice
Joomla! Apprentice
Posts: 48
Joined: Mon May 04, 2009 3:20 pm
Location: Santa Fe, NM
Contact:

Re: Cannot send session cookie - headers already sent

Post by hopekiah » Mon May 04, 2009 7:14 pm

The following errors happened after finishing the last step in the joomla installation, which included deleting the installation folder and then creating a new configuration.php file from the text supplied in the last dialog box. I opened my site in joomla and got these errors:

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by...

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at ...

Warning: Cannot modify header information - headers already sent by ...

I found this forum and decided to try saving the configuration.php file in a different way which was unicode utf8 no BOM and it worked!

287d
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 182
Joined: Mon Jan 05, 2009 4:09 am

Re: Cannot send session cookie - headers already sent

Post by 287d » Sun Jun 14, 2009 1:24 am

lima_fil wrote:Just fix it.
I saved php file (edited with notepad) in ANSI format, not UTF-8 which was default.
SO if you dont have an extra blank line, you should try this one.
Pozzdrav

thank you! fixed my j1.5 problem!

may_bailey
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 166
Joined: Tue Oct 03, 2006 8:09 pm

Re: Cannot send session cookie - headers already sent

Post by may_bailey » Sat Jul 11, 2009 9:16 pm

How can I find the globals.php file?? in which directory??

thnx
Just May Bailey

User avatar
sakiss
Joomla! Explorer
Joomla! Explorer
Posts: 371
Joined: Wed Aug 20, 2008 4:09 pm

Re: Cannot send session cookie - headers already sent

Post by sakiss » Wed Jul 22, 2009 6:59 pm

Guys also check the encodings

i ve saved my configuration.php with UTF-8 and caused the above problem.

The problem solved when i changed it to ANSI

Zaid101
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Fri Feb 06, 2009 1:43 pm

Re: Cannot send session cookie - headers already sent

Post by Zaid101 » Thu Dec 17, 2009 11:10 am

This also Fixed my problem, Thank ssakiss

.. I saved my configuration.php using ITF8. now saved it on ANSI and its done...

cjmicro
Joomla! Intern
Joomla! Intern
Posts: 54
Joined: Tue May 27, 2008 11:59 pm

Re: Cannot send session cookie - headers already sent

Post by cjmicro » Tue Feb 16, 2010 9:25 pm

saved my configuration.php with UTF-8 and caused the above problem.
The problem solved when i changed it to ANSI
Me too!! Thanks so much! 8)

Cheryl

ahmetkemal
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Mar 26, 2010 8:27 pm

Re: Cannot send session cookie - headers already sent

Post by ahmetkemal » Fri Mar 26, 2010 8:29 pm

Guys the problem is about the corrupted characters before <?php . Those appears when you changed encoding ANSII to UTF-8. Edit your configuration.php with a HEX editor or re-encode it with Notepad++ and select "Encode in UTF-8 without BOM"

Suk Un
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Apr 14, 2010 5:25 am

Re: Cannot send session cookie - headers already sent

Post by Suk Un » Wed Apr 14, 2010 5:38 am

Hi,

I don't know if this helps, but I battled this problem for hours yesterday. Eventually, I figured out it was related to the length of the domain name.

I was installing a unix based virtual host and if I installed a fresh just downloaded latest version of Joomla on a domain that was 7 characters long, it would work, but if the domain was longer such as another domain I had that was 10 characters long it would not work.

It drove me crazy, until eventually I installed another copy of joomla in another directory on my shorter domain and copied the joomal directory to the longer domain name once it was configured.

This seems to do the trick for me, hope this helps.

Suk Un

Suk Un
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Apr 14, 2010 5:25 am

Re: Cannot send session cookie - headers already sent

Post by Suk Un » Wed Apr 14, 2010 7:30 am

Okay, that wasn't as good as an idea as I thought.

When you want to install any extensions, etc it referers to the original location I installed it in.

Anyone else figured out how to fix this issue?

User avatar
saviola
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu May 27, 2010 10:32 am
Location: Plivdiv.Bulgaria
Contact:

Re: Cannot send session cookie - headers already sent

Post by saviola » Thu May 27, 2010 10:52 am

ahmetkemal wrote:Guys the problem is about the corrupted characters before <?php . Those appears when you changed encoding ANSII to UTF-8. Edit your configuration.php with a HEX editor or re-encode it with Notepad++ and select "Encode in UTF-8 without BOM"
Yes that's right. I had the same problem and i was quite confuse. After a lot of research i found this information then i fixed the problem.

I hope that this will save you time and frustration.
Nothing is imposible imagination is everything!
Benchmark Software | World's fastest database

randyenicholas
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Fri Jun 04, 2010 4:21 pm

Re: Cannot send session cookie - headers already sent

Post by randyenicholas » Fri Jun 04, 2010 4:24 pm

I am having this problem:


Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/syna2358/public_html/index.php:1) in /home/syna2358/public_html/libraries/joomla/session/session.php on line 423

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/syna2358/public_html/index.php:1) in /home/syna2358/public_html/libraries/joomla/session/session.php on line 423

Warning: Cannot modify header information - headers already sent by (output started at /home/syna2358/public_html/index.php:1) in /home/syna2358/public_html/libraries/joomla/session/session.php on line 426


I have not edited any files - this just happened out of the blue on four completely separate Joomla installations.

Any ideas?

randyenicholas
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Fri Jun 04, 2010 4:21 pm

Re: Cannot send session cookie - headers already sent

Post by randyenicholas » Fri Jun 04, 2010 4:39 pm

re: Previous post

I check the file the error is referencing, but there doesn't seem to be anything wrong with it, and it's encoded properly. I've never opened this file before. I'm lost.

User avatar
saviola
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu May 27, 2010 10:32 am
Location: Plivdiv.Bulgaria
Contact:

Re: Cannot send session cookie - headers already sent

Post by saviola » Fri Jun 04, 2010 4:45 pm

Just for clarity, this troubles coming from something effort which try to print something!

Probably this is bug In Joomla.
You can post this bug here Joomla! 1.5.x Bug Tracker.
If you want to try to fix it you can debug your files and watch for mistakes described in link in my post above.
Nothing is imposible imagination is everything!
Benchmark Software | World's fastest database

randyenicholas
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Fri Jun 04, 2010 4:21 pm

Re: Cannot send session cookie - headers already sent

Post by randyenicholas » Fri Jun 04, 2010 4:58 pm

But why would it start just out of the blue on some installations and not others? And on installations that have been untouched and working fine for months?

achieverzain
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Jun 15, 2010 11:44 pm

Re: Cannot send session cookie - headers already sent

Post by achieverzain » Tue Jun 15, 2010 11:47 pm

Thanks that changing the file format of the configuration file had resolved my issue as well.

pgtips
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Sat Sep 15, 2007 3:50 pm

Re: Cannot send session cookie - headers already sent

Post by pgtips » Tue Jun 22, 2010 1:08 pm

Thank you so much. Saving as ANSI worked for me too. I had edited config file in Dreamweaver so not sure if that's where it became UTF-8. Must start using notepad++

idkdaa
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Wed Jun 23, 2010 10:02 pm
Contact:

Re: Cannot send session cookie - headers already sent

Post by idkdaa » Sat Jun 26, 2010 1:48 am

This worked for me...thought I would clarify a bit
  • Open your configuration.php file in "htdocs/website" with notepad++
    On the menu bar, drop down "encoding", change it from Encode in UTF-8 to Encode in ANSI
    Save the file
    Restart Apache
    Profit!
Thanks all!

rizn
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Jul 20, 2010 6:52 pm

Re: Cannot send session cookie - headers already sent

Post by rizn » Tue Jul 20, 2010 6:56 pm

you can also encode to this in Notepad++ like ahmetkemal said:
UTF8 without BOM

for special chars! äöü

User avatar
hardy_ali
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Mon Aug 02, 2010 12:20 pm

Re: Cannot send session cookie - headers already sent

Post by hardy_ali » Mon Aug 02, 2010 12:34 pm

i had the same problem..i solved by checking my joomla version and download its stable patch package. unzip then i upload and replaced two files in the same dir in root and /administrator for index.php ....

all the best
DEE TECHNOLOGY
High Performance Solutions
http://www.dee-technology2u.com

bachmahoangtu
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Thu Sep 30, 2010 9:50 am

Re: Cannot send session cookie - headers already sent

Post by bachmahoangtu » Mon Oct 11, 2010 12:09 pm

Last week, I changed my host and I have some error with my site. Here my
error:
Warning: session_start() [function.session-start]: Cannot send session
cache limiter - headers already sent (output started at
/home/binhminh/public_html/index.php:2) in
/home/binhminh/public_html/libraries/joomla/session/session.php on line 422

Warning: Cannot modify header information - headers already sent by (output
started at /home/binhminh/public_html/index.php:2) in
/home/binhminh/public_html/libraries/joomla/session/session.php on line 424
I have already save session.php and configuration.php to utf8 without Bom,
and re_install languguage file such as mod_gtranslate and vietnamese
language for joomla. But these error can not fix. Please help me.

My email: [email protected].

Advertisement

Locked

Return to “General Questions - 1.0.x”