Jump to content

Warning: session_start() [function.session-start]: Cannot send session cache


Recommended Posts

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.

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.

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.