Xyphon Posted April 22, 2010 Share Posted April 22, 2010 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/mythical/public_html/furiousflash/forum/forum.php:1) in /home/mythical/public_html/furiousflash/forum/Connect.php on line 3 What's going on? This is my index.php: <?PHP include('Connect.php'); include('Top.php'); $Forum_Result= mysql_query("SELECT * FROM forum_board WHERE Category='General'"); $Forum_Result2= mysql_query("SELECT * FROM forum_board WHERE Category='Mythical Tales'"); echo "<div class='Category'><b>General</b></div>"; echo "<div class='Board'><b>Board Name:</b></div><div class='Topics'><b>Topics:</b></div><div class='Posts'><b>Posts:</b></div><div class='Last_Post'><b>Last Post:</b></div>"; while($row = mysql_fetch_array($Forum_Result)){ echo "<div class='Board'><a href='forum.php?id=" . $row['ID'] . "'>" . $row['Name'] . "</a></div><div class='Topics'>" . $row['Topics'] . "</div><div class='Posts'>" . $row['Posts'] . "</div><div class='Last_Post'>" . $row['Last_Post'] . "</div>"; } echo "<div class='Category2'><b>Mythical Tales</b></div>"; echo "<div class='Board'><b>Board Name:</b></div><div class='Topics'><b>Topics:</b></div><div class='Posts'><b>Posts:</b></div><div class='Last_Post'><b>Last Post:</b></div>"; while($row = mysql_fetch_array($Forum_Result2)){ echo "<div class='Board'><a href='forum.php?id=" . $row['ID'] . "'>" . $row['Name'] . "</a></div><div class='Topics'>" . $row['Topics'] . "</div><div class='Posts'>" . $row['Posts'] . "</div><div class='Last_Post'>" . $row['Last_Post'] . "</div>"; } ?> And this is my connect: <?php ini_set("session.gc_maxlifetime","9999999"); session_start(); mysql_connect('localhost','user','pass'); mysql_select_db('mythical_furious'); ob_start(); ini_set("memory_limit","20M"); ?> Now, I don't get this error on my index.php, but I made an exact C+P copy and named it forum.php and then I get this error.. Why? Please help. Quote Link to comment https://forums.phpfreaks.com/topic/199405-warning-session_start-functionsession-start-cannot-send-session-cache/ Share on other sites More sharing options...
PFMaBiSmAd Posted April 22, 2010 Share Posted April 22, 2010 output started at /home/mythical/public_html/furiousflash/forum/forum.php:1 (line 1) You either have some character(s) in the file before the <?php tag or your file has been saved as a UTF-8 encoded file and the BOM (Byte Order Mark) characters that your editor placed at the start of the file is the output that is occurring on line 1. The solution is simple. Check if there are any character(s) before the <?php tag and delete them or save your file as a UTF-8 encode file without the BOM or save it as an ANSI encoded file. Quote Link to comment https://forums.phpfreaks.com/topic/199405-warning-session_start-functionsession-start-cannot-send-session-cache/#findComment-1046545 Share on other sites More sharing options...
Xyphon Posted April 22, 2010 Author Share Posted April 22, 2010 How do you save it as something else? Quote Link to comment https://forums.phpfreaks.com/topic/199405-warning-session_start-functionsession-start-cannot-send-session-cache/#findComment-1046548 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.