====== Cannot send session cookie ====== :?: I edited the [[:config]] file and now I'm getting errors like this Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/codecrai/public_html/wiki/conf/dokuwiki.php:81) in /home/codecrai/public_html/wiki/inc/common.php on line 22 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/codecrai/public_html/wiki/conf/dokuwiki.php:81) in /home/codecrai/public_html/wiki/inc/common.php on line 22 Warning: Cannot modify header information - headers already sent by (output started at /home/codecrai/public_html/wiki/conf/dokuwiki.php:81) in /home/codecrai/public_html/wiki/doku.php on line 123 :!: This happens when your editor adds a newline after the closing %%?>%% php tag. This starts the output and PHP can't send cookies and other headers anymore. To fix it simply remove the newline or the whole closing tag. Also make sure you have no leading whitespace before the starting %%Byte Order Mark]]. Certain Windows software (eg. Notepad) is known to do this. The solution is to save the file using software which doesn't save this mark or allows you to omit it. The freeware program [[http://www.flos-freeware.ch/notepad2.html|Notepad2]] does this correctly when using ''Encoding''->''UTF-8''. {{ wiki:np2-bom.png |Encoding Setting in Notepad2}} :!: This error is also displayed when another error occurs first and PHP starts the output by printing the error message. If you get any other error before the "cannot send session cookie" message, you need to fix that one first. :!: About the closing tag, we should be aware of [[http://framework.zend.com/manual/en/coding-standard.php-file-formatting.html#coding-standard.php-file-formatting.general|this recommendation]]. The [[tips:findbadphp.php]] script might help finding the problematic file.