Hi guys, When I try to run the following code I get these three errors: Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/42/9125042/html/user.php:1) in /home/content/42/9125042/html/user.php on line 1 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/42/9125042/html/user.php:1) in /home/content/42/9125042/html/user.php on line1 Warning: session_regenerate_id() [function.session-regenerate-id]: Cannot regenerate session id - headers already sent in /home/content/42/9125042/html/user.php on line 4 Why? I thought if the first thing I did was start the session, without any output on the page, headers weren't sent yet. What might be sending the headers? Thanks, -Tony
Hi there, did you include a file on the first line? if not you have a BOM problem http://stackoverflow.com/questions/9646540/byte-order-mark-causing-session-errors
Well, the first line was <?, and then the session stuff caused an error. I'll check that link in the morning... yawn. Thanks, -Tony
When the script starts with session_start and gives an error that would not solve the problem don't you think?
I told my editor (Notepad++) to convert the file to 'UTF-8 without BOM' It doesn't come up with the error anymore! Thanks, -Tony