Session problem

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Session problem

Postby simonvlc » 12. March 2006 02:52

Hello,

after installing for the first time CakePHP and starting with the first tutorial, I get this message when I try to view the page in the firefox.

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\Archivos de programa\xampp\htdocs\cake\app\models\post.php:1) in C:\Archivos de programa\xampp\htdocs\cake\cake\libs\session.php on line 131

Anyone knows what can be the problem? Thanks in advance, Simon.
simonvlc
 
Posts: 3
Joined: 11. March 2006 16:19

Postby cj_nza » 13. March 2006 00:42

PHP started to output data to the browser before the session_start() function was called.

Open your
C:\Archivos de programa\xampp\htdocs\cake\app\models\post.php
file in a text editor and see if you can find out what created output to the browser in that page (Prior to the script reaching the call to the session_start() function).

You could also take a look at this topic.
http://community.apachefriends.org/f/viewtopi ... ssionstart
cj_nza
 
Posts: 53
Joined: 06. September 2005 11:49

Postby simonvlc » 13. March 2006 01:33

Thanks for your answer.

This is my post.php file:

<?php
class Post extends AppModel
{
var $name = 'Post';
}
?>

I don´t know what can cause this behavior with sessions. Any idea?
simonvlc
 
Posts: 3
Joined: 11. March 2006 16:19

Postby Wiedmann » 13. March 2006 01:42

Any empty lines or a CR before or after this code?
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

Postby simonvlc » 13. March 2006 15:50

Wiedmann wrote:Any empty lines or a CR before or after this code?


None.
simonvlc
 
Posts: 3
Joined: 11. March 2006 16:19


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 51 guests