Not sure if this is in the right forum? Anyway Im not sure what happened but when I try to login into one of sites I get this error: Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/myspace2/public_html/index.php:2) in /home/myspace2/public_html/plugins/admin/admin_entrance.php on line 4 Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/myspace2/public_html/index.php:2) in /home/myspace2/public_html/plugins/admin/admin_entrance.php on line 4 Warning: Cannot modify header information - headers already sent by (output started at /home/myspace2/public_html/index.php:2) in /home/myspace2/public_html/plugins/admin/admin_entrance.php on line 17 Any suggestions?
i'm guessing that u haven't made sure the very first thing is the session start... <? session_Start(); ....rest of code.... ?> And if you are using a header file, make sure it comes before the header file. <? session_start(); include("header.php"); ....rest of code.... ?> hope this helps!!!
Another thing with this error is avoid calling session_start() after something has been printed. If there is something printed means a header has been sent.
Or, start off your code (very top of the file) with ob_start(); This starts output buffering and can often reduce these errors. The best recommendation is to follow the previous advice and clean up the code, but I wanted to throw in this little tip. If you use it, it's a best practice to finish up the file with ob_end_flush(); to clear the buffer. For more info on these functions, see php.net