[RESOLVED] problem with session: "Cannot send session cookie"
hi
i write only below code in "index.php":
PHP Code:
<?php
session_start();
?>
but i see this error:
Code:
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at J:\wamp\www\Project\index.php:1) in J:\wamp\www\Project\index.php on line 2
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at J:\wamp\www\Project\index.php:1) in J:\wamp\www\Project\index.php on line 2
i don't send any thing for output but this error is show.
please help me. what i do?
Re: problem with session: "Cannot send session cookie"
is there any includes, html, or php above that code?
Re: problem with session: "Cannot send session cookie"
Please upload the file. Remember, that even whitespace before the opening PHP tag counts as output.
1 Attachment(s)
Re: problem with session: "Cannot send session cookie"
no no. i use only attached code
Re: problem with session: "Cannot send session cookie"
I opened your file in a hex editor and there appears to be 3 bytes preceding the <?php. I uploaded the file to my server and although I got no error I did get a junk string:
http://adam.codedv.com/shamsoft/index.php
Did you create and save this file as unicode? Ensure that when you save, you select ANSI as your encoding and not unicode.
Re: problem with session: "Cannot send session cookie"
thank visualAd
i save my file as UTF-8 :blush:
i newcomer to PHP :rolleyes: and my english is ill too :bigyello: