Warning: Cannot send session cache limiter - headers already

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
shiranwas
Forum Commoner
Posts: 53
Joined: Fri Jul 07, 2006 10:41 pm
Location: Colombo

Warning: Cannot send session cache limiter - headers already

Post by shiranwas »

hi,

i got the above warning and i am clue less.

i have page called assign.php i have put the following coding on the top of the
page before anything else

Code: Select all

<?php
	session_start("mertek");
	
?>

in the same page there is a submit button when i click it after quering the database it will redirect to the assign.php, at that time the above warning displays.

help me please
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

you sure there is nothing before it? not even any white space or anything?
User avatar
shiranwas
Forum Commoner
Posts: 53
Joined: Fri Jul 07, 2006 10:41 pm
Location: Colombo

Post by shiranwas »

yes i am sure, and its works when it first appears but when i click on a submit button and include(assign.php) only problam occures
User avatar
bmcewan
Forum Commoner
Posts: 55
Joined: Wed Jun 02, 2004 7:19 am
Location: West Yorkshire, UK.

Post by bmcewan »

What is happening in the file before you include that file?

Post some code.
User avatar
shiranwas
Forum Commoner
Posts: 53
Joined: Fri Jul 07, 2006 10:41 pm
Location: Colombo

Post by shiranwas »

this is the whole page which includes the page assing.php

Code: Select all

<?php



if ($_POST['cmdOK']=="SAVE"){
include('Conn.php');
$department=$_POST['cboDept'];
$departmentid="";

//echo $department;
//--------------finding dept id -----------------------------------------


$sql="select deptid from tbldepartments  where deptname='$department' ";
$query=mysql_query($sql) or die ("Can not query the department table");
$row=mysql_fetch_assoc($query);

if (!$row){
	echo "Department does not exist.";
	//break;
}else{
	$departmentid=$row['deptid'];			
}

//----------------------------------------------------------------------

$message=$_POST['result'];
$reject=$_POST['chkRejected'];
$jobno=substr($_POST['optSelected'],1,4);
$che='N';
$completed='N';

if ($reject !=''){
	$che='Y';
	$completed='Y';
}


$sql="update  tblComplaints set message='$message' , rejected='$che', deptid='$departmentid',completed='$completed' where jobno='$jobno' ";

 
 include('assign.php');
 
 }
 if ($_POST['next']=="next"){
	$_SESSION['start']=$_SESSION['start']+2;
 	include('assign.php');
 } 
?>
User avatar
bmcewan
Forum Commoner
Posts: 55
Joined: Wed Jun 02, 2004 7:19 am
Location: West Yorkshire, UK.

Post by bmcewan »

is there anything else, other than that error on the screen.

Can you paste the full error here as well including file and line numbers.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

bmcewan wrote:Can you paste the full error here as well including file and line numbers.
only for clearity: that's the output startet at /path/to/script.php:5 part, where 5 is the line number in that file.
And php is never wrong about when or were the output started ;)
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

You most likely have a line break, tab, space or some other character after the closing ?> tag in your included file.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Post Reply