Very strange bug in session_start()
Posted: Sun Jan 05, 2014 2:49 am
Hi everyone, i'm using Denwer server on my local pc. I have a directory
On each page (via include_once)
But in this file I get error
sysTop.php file
First lines from dialog.php
I run code\account\messages\dialog.php
Code: Select all
session_start();But in this file I get error
What's the problem?Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at Z:\home\localhost\www\account\messages\dialog.php:1) in Z:\home\localhost\www\sysTop.php on line 3
sysTop.php file
Code: Select all
<?
include_once("db.php");
session_start();
include_once("pub.php");
$user = $_SESSION['user'];
$username = getUsernameById($user);
?>Code: Select all
<?php
include_once("../../sysTop.php");
$dialog = $_REQUEST['id'];
if(isValidId($dialog))
{
$gdCnt = mysql_query("SELECT COUNT(*) as cnt FROM dialogsUsers WHERE dialogId='$dialog' AND user='$user'") or die(mysql_error());
$gdCnt = mysql_fetch_assoc($gdCnt);
if($gdCnt['cnt'] != 1) moveTo404();
}
else moveTo404();
include_once("../../top.php");