I know this is all around the internet but I did everything I could and it still gives me this error:
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/content/d/a/r/BLAH/html/XSVG/System Files/Nav.cf:8) in /home/content/d/a/r/BLAH/html/XSVG/Admin/Files/Auth.php on line 4
The code is...
Nav.cf
PHP Code:
<htmL> <br> <center><a href="Main.php">Home</a> | <a href="Main.php?Page=CrtShw">Add A Show</a> | <a href="Main.php?Page=UpldEp">Upload Episode</a> | <a href="Main.php?Page=BugRpt">Bug Report</a> | <a href="Main.php?Page=Logout">Logout</a><br> <a>Welcome To BETA Testing!| Version =</a>
and...
Auth.php
PHP Code:
<? include '/home/content/d/a/r/BLAH/html/XSVG/System Files/Config.php'; if ( $_POST["psswrd"] == $Password ) { session_start(); $_SESSION['views'] = 1; include '/home/content/d/a/r/BLAH/html/XSVG/System Files/Config.php'; include '/home/content/d/a/r/BLAH/html/XSVG/System Files/SysInfo.php'; include '/home/content/d/a/r/BLAH/html/XSVG/System Files/Nav.php';
People tell me to move the session_start(); but if I do the code wont work as its suppose to. Can someone PLEASE help I spent over 2 hours on this one little error!
I'd move session_start to the beggining of the script, just after <? .
Besides make sure, there's no BOM in the beggining of the script.
Morover, you can read about ob_start() and ob_end_flush() and try it.
Regards
As rogem002 stated, you need to put session_start before anything in order to send the cookies information in the headers. Otherwise the browser cannot get the cookies information.
__________________ Please login or register to view this content. Registration is FREE
Professional hosting for all pockets! Please login or register to view this content. Registration is FREE
Hey thanks a lot! What I didn't do before was I didn't bring it to the top of Main.php page. Main.php page has a php switch and Auth.php was in that switch so as soon as i put the session start on the top of Main.php it worked. Thanks a lot!