Php warning in session test

hmmm, this has me really stumped. If you now add session start to the line above are you getting the error?

If it is the case then I am afraid I am out of ideas :frowning:

Something is getting outputted to the screen before session start.
this “<?php” should be the very first thing in your file, ie… no spaces or line breaks before it.

Another culprit is a BOM which is invisible but still counts as output. In the past I have selected and deleted the php opening tag and backspaced over it for good measure and then re typed the php opening tag and the error went away. That had me scratching my head for about an hour because the php tag was the very first item in the file.
HTH

I have the code below at http://dot.kr/x-test/page1-6.php .

<?php session_start();?>

“<?php” is the very first thing in my file.
But the output of it says like the following.

Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\RWAPM\www\x-test\page1-6.php:1) in C:\RWAPM\www\x-test\page1-6.php on line 1

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\RWAPM\www\x-test\page1-6.php:1) in C:\RWAPM\www\x-test\page1-6.php on line 1

2 servers(PHP + Coldfusion) are run my root directory “www” in my computer.

That ColdFusion collide with PHP is possible?

I solved it by storing files as ANSI instead of UTF-8 with notepad at http://dot.kr/x-test/page2-3.php .

glad it’s sorted at least to some extent :slight_smile:

I would see that as a workaround rather than a solution because you shouldn’t have to do that.

I still don’t get any errors or warnings when I run your code on my local or “real” web server which is what I would expect because I can’t see anything wrong with your actual code.

I still suspect you have a server/software configuration issue but I’m not a systems admin person so I don’t know how to fix it.