Friday, April 19, 2013

Cannot send session cookie - headers already sent warning message in php

If you are getting warning in php file that "Cannot send session cookie - headers already sent".
For solution you should insure that nothing is being sent to the page before the session_start().

Make sure its a plain ANSI file, not utf-8 or anything.
if it is not ANSI file then open notepad, insert the php code, and save it as plain ANSI. It should work fine.