Page 1 of 1

Session problem

PostPosted: 12. March 2006 02:52
by simonvlc
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.

PostPosted: 13. March 2006 00:42
by cj_nza
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

PostPosted: 13. March 2006 01:33
by simonvlc
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?

PostPosted: 13. March 2006 01:42
by Wiedmann
Any empty lines or a CR before or after this code?

PostPosted: 13. March 2006 15:50
by simonvlc
Wiedmann wrote:Any empty lines or a CR before or after this code?


None.