Cannot send session cache limiter

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
mesz
Forum Contributor
Posts: 216
Joined: Fri May 23, 2003 8:11 am
Location: M/cr

Cannot send session cache limiter

Post by mesz »

Please, what doe sthis error mean?
Warning: Cannot send session cache limiter - headers already sent (output started at /home/virtual/site140/fst/var/www/html/t3.php:11) in /home/virtual/site140/fst/var/www/html/news/view.php on line 2
and how do I avoid it?
User avatar
markl999
DevNet Resident
Posts: 1972
Joined: Thu Oct 16, 2003 5:49 pm
Location: Manchester (UK)

Post by markl999 »

It means session_start() must come before any output is sent. Output is basically anything that's sent to the browser..including white space.
So all the following will fail:

Code: Select all

<html>
<?php session_start() ?>

<space here><?php
session_start();

<?php
include_once 'foo.php';
session_start(); //will fail if foo.php outputs anything
Line 11 of /home/virtual/site140/fst/var/www/html/t3.php is outputting something in your case before the session_start()
User avatar
mesz
Forum Contributor
Posts: 216
Joined: Fri May 23, 2003 8:11 am
Location: M/cr

Post by mesz »

I see!
Got to go now, I'll let you know on Monday if it works!
User avatar
itsmani1
Forum Regular
Posts: 791
Joined: Mon Sep 29, 2003 2:26 am
Location: Islamabad Pakistan
Contact:

rep

Post by itsmani1 »

wel u just use
this on the top of ur page

ob_start('mb_output_handler');

hope it will work.
Post Reply