Friday, February 19, 2010

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

I'm trying to review my PHP knowledge by creating a new simple web application. I know PHP is a bit different from Java but PHP is much easier to use in creating a Web application. Last night, i tried to run one of my old applications named sbp and i got this error:


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


My SBP app is a simple registration, this was running 6 years ago. My pc OS before was Windows 2000 and i was using XAMPP, PHP version 5 and mySQL. Right now, my pc OS is Windows XP. I searched google and it said that there should be no print outputs and blank lines before calling session_start(). Is this a new rule? I also remember that my app was running perfectly in Linux ( again 6 years ago). It worked perfectly even there were "echo" statements before calling session_start(). I'm still wondering why this error occur? I know I'm too outdated. Are there any issues or new rules regarding PHP running in Windows XP?

No comments:

Post a Comment

You might also like:


Related Posts Plugin for WordPress, Blogger...