Have you checked for Byte Order Mark (BOM) ? It happens when your file is in UTF8 and you open it with Windows’ Notepad.exe. – Geoffroy Mar 12 ’13 at 16:47
-
How do i check for BOM? If this is causing the issue how do i get rid of it? – Kaya Suleyman Mar 12 ’13 at 16:50
-
-
-
Microsoft Expression. I’m new to this stuff, how do i check for BOM, what does it look like and how do i get my code working again? – Kaya Suleyman Mar 12 ’13 at 16:54
- Download Notepad++ and open the file there, delete all fancy characters before the
<?PHP
- Make sure there is no whitespace character like ” ” or tab or linebreak before the
<?PHP
.- In Notepad++ click
Encoding
and thenUTF-8 without BOM
to convert the file to UTF-8 without BOM, then save it.
- In Notepad++ click
- Also add
ob_start();
beforesession_start();
to be safe.
- Download Notepad++ and open the file there, delete all fancy characters before the
Source: PHP issue “Cannot send session cookie” – Stack Overflow
PHP issue “Cannot send session cookie” – Stack Overflow was last modified: December 1st, 2020 by