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.
zoomlanski
Joomla! Intern
Joomla! Intern
Posts: 81
Joined: Thu Oct 23, 2008 10:59 am

Re: Cannot send session cookie - headers already sent

Post by zoomlanski » Sat Nov 13, 2010 10:27 pm

Hello Joomla gurus - I'm needing some help.

Fresh install of 1.5.22. All works good, until I try to run a phpbb3 module of daily digest.

What the heck does this mean? My config is great, it happens on all browsers, and seems only related to joomla.

Lines 423 of session.php are -

function _start()
{
// start session if not startet
if( $this->_state == 'restart' ) {
session_id( $this->_createId() );
}

Line 423 --- session_cache_limiter('none');
session_start();

// Send modified header for IE 6.0 Security Policy
Line 426 --- header('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"');

return true;


It returns the error:

Starting mail_digests.php
[phpBB Debug] PHP Notice: in file /home1/lxxxx/public_html/peelparamedics/libraries/joomla/session/session.php on line 423: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /mail_digests.php:1118)
[phpBB Debug] PHP Notice: in file /home1/xxxx/public_html/peelparamedics/libraries/joomla/session/session.php on line 423: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /mail_digests.php:1118)
[phpBB Debug] PHP Notice: in file /home1/xxxx/public_html/peelparamedics/libraries/joomla/session/session.php on line 426: Cannot modify header information - headers already sent by (output started at /mail_digests.php:1118)
Ending mail_digests.php

Joomla gurus please help.

Thanks
Tim

amoozzz
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Tue May 10, 2011 1:03 pm

Re: Cannot send session cookie - headers already sent

Post by amoozzz » Fri May 13, 2011 9:47 am

Ok you can simply laugh at how I solved mine:

I was working on some other stupid error, when I got the new error of: "Cannot send session cache blah blah blah" (the error this forum is about!) :D

Anyway, I followed your suggestions although I hadn't done/edit any of the things you mentioned.nothing worked and it was no surprise since i was clean on those doings.

At last, as a pity act, I opened my main configuration.php file, I changed encoding to ANSI; there were no blanks,no disorders. However, i pressed "space", then "enter" randomly between some lines! (FYI,remember where you do it!!) I changed everything back to normal at the end and saved my file. and IT'S OK NOW!! ??? ??? ??? :eek: :eek:

I guess it's a million dollar question of : what the heck was that!!
anyway, hope this helps and hope we won't face any metaphysical errors in Joomla again!!! :laugh: :laugh:

umut61
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Sat May 14, 2011 6:23 am
Contact:

Re: Cannot send session cookie - headers already sent

Post by umut61 » Sat May 14, 2011 6:36 am

The file format of the configuration file had resolved my issue as well. Thanks all

scarrandi
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Mar 14, 2011 7:02 pm

Re: Cannot send session cookie - headers already sent

Post by scarrandi » Mon Sep 05, 2011 3:01 pm

Hello I'm having this issue, I'm migrating my website from one hosting a new one with a different vendor, and I'm getting errors with session.

This is the first time I get this error..

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /homepages/28/d283790822/htdocs/configuration.php:1) in /homepages/28/d283790822/htdocs/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 /homepages/28/d283790822/htdocs/configuration.php:1) in /homepages/28/d283790822/htdocs/libraries/joomla/session/session.php on line 423

Warning: Cannot modify header information - headers already sent by (output started at /homepages/28/d283790822/htdocs/configuration.php:1) in /homepages/28/d283790822/htdocs/libraries/joomla/session/session.php on line 426

If some one could help me,

Thanks in advance,

Sunny


kremo5le
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 122
Joined: Thu Jul 31, 2008 9:23 pm
Location: United States

[SOLVED] Cannot send session cookie - headers already sent

Post by kremo5le » Fri Jan 13, 2012 4:20 am

That is exactly the issue: using Note or WordPad to edit. The best way is to use a professional tool like DreamWeaver.

This issue happened to me because I had to work at my client's computer and all they had was NotePad.

Marco Sartore
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Mon Dec 29, 2008 9:43 am

Re: Cannot send session cookie - headers already sent

Post by Marco Sartore » Mon Dec 03, 2012 1:29 pm

Hello,
same problem, same solution (i.e. ANSI saving by Notepad) BUT...

I must add that in my very particular case, maybe useful for somebody else, I got file php.ini renamed with a different extension and this prevented the system to work without getting the "session cookie" error message.
This was due to a temporary suspension of the site by the provider who did not rename the php.ini file once the site was reactivated.
Renaming the file as php.ini in conjunction with the proper ANSI saving of file configuration.php fixed the issue.

Hope this helps,
Marco

gespinosa
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Apr 03, 2013 5:58 am

Re: Cannot send session cookie - headers already sent

Post by gespinosa » Wed Apr 03, 2013 6:16 am

Problem:
I migrated my 1.5.18 site to 1.5.26 --> everything OK
I upgraded some plug ins --> Everything OK
Using Filezilla, I edited config.php file to change the db password
I switched my default PHP version to latest (1&1 host)
After this, I Couldnt login to administration backend with any user. No error, just back to the login form.

I went back to earlier PHP version, then "headers sent" error appear
After reading this post, I realized that Filezilla used Notepad as default to edit configuration.php file.

This is what i did:
Downloaded configuration.php file
Open the file with Notepad++
Convert to ANSI
Insert one line in the file
Save the file
uploaded file
And that's it!!!! I could login again.

Thank you for the hint!!!

altijdvliegen
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Apr 30, 2010 9:45 am

Re: Cannot send session cookie - headers already sent

Post by altijdvliegen » Mon Jun 24, 2013 8:17 pm

Hi,
I solved it the same problem by setting 'error_reporting' in the cofiguration.php on '1' .

succes,
Marc

siamnaulak
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Sun Jul 24, 2011 9:18 am

Re: Cannot send session cookie - headers already sent

Post by siamnaulak » Tue Nov 26, 2013 4:08 am

altijdvliegen wrote:Hi,
I solved it the same problem by setting 'error_reporting' in the cofiguration.php on '1' .

succes,
Marc
I also face the same problem, when I tried Marc said it works...

var $error_reporting = '-1';
TO
var $error_reporting = '1';

Thanks

eugeniochaparro
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Mar 12, 2015 9:15 am

Re: Cannot send session cookie - headers already sent

Post by eugeniochaparro » Thu Mar 12, 2015 9:22 am

I have the same problem but I resolve it deleting a black line in index.php
This was the problem

Code: Select all




<?php
/**
 * @package    Joomla.Site
 *
 * @copyright  Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */
if (version_compare(PHP_VERSION, '5.3.1', '<')) {
  die('Your host needs to use PHP 5.3.1 or higher to run this version of Joomla!');
}
And this was the solution

Code: Select all

<?php
/**
 * @package    Joomla.Site
 *
 * @copyright  Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */
if (version_compare(PHP_VERSION, '5.3.1', '<')) {
  die('Your host needs to use PHP 5.3.1 or higher to run this version of Joomla!');
}


Locked

Return to “General Questions - 1.0.x”