session_start(), cannot send session cookie/cache limiter
Posted: Wed Mar 18, 2009 1:12 pm
Hi, after spending the whole day reading forums I still can't figure this out.
These are the error messages I get.
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at ####/httpd.www/test.php:1) in ####/httpd.www/test.php on line 1
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at ####/httpd.www/test.php:1) in ####/httpd.www/test.php on line 1
2 files:
index.html
test.php
I click the Test link and the error occurs.
There's no linebreak, space or any other character before the php-tag, I checked in dreamweaver, notepad and eclipse.
(I saved both files as UTF-8 in notepad and the charsets are set to UTF-8 as you can see in the code)
So I figured I had to save the files as UTF-8 without BOM. I used dreamweaver for this but that didn't help.
So now I'm out of options.
Any help would be appriciated.
Enlighten me please
These are the error messages I get.
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at ####/httpd.www/test.php:1) in ####/httpd.www/test.php on line 1
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at ####/httpd.www/test.php:1) in ####/httpd.www/test.php on line 1
2 files:
index.html
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>sdfsdf</title>
</head>
<body>
<a href="test.php">test</a>
</body>
</html>Code: Select all
<?php session_start();?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
</body>
</html>There's no linebreak, space or any other character before the php-tag, I checked in dreamweaver, notepad and eclipse.
(I saved both files as UTF-8 in notepad and the charsets are set to UTF-8 as you can see in the code)
So I figured I had to save the files as UTF-8 without BOM. I used dreamweaver for this but that didn't help.
So now I'm out of options.
Any help would be appriciated.
Enlighten me please