Strange Error with Sessions

liunx

Guest
I have transfered over all my files from one webhost to another this evening. All my scripts work perfectly on the old webhost and they work just as perfect on the new host, except for one problem. When i login to any page which requires sessions I get this error message on the top of the page
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/chefshop/domains/cormacmoylan.com/public_html/pixelscience/site/ticket/your_ticket.php:3) in /home/chefshop/domains/cormacmoylan.com/public_html/pixelscience/site/ticket/your_ticket.php on line 7


however the page renders properly and it doesn't seem to cause any problems. The php code that it references in the error on line 7 of your_ticket.php is
<? session_start(); ?>
<?
include 'db.php';
//session_checker();

?>
<?php
echo 'more code down here'
?>

my mysql database is up and running just in case someone asksCheck for any whitespace before <? session_start(); ?>.<? session_start();
include 'db.php';
//session_checker();
echo 'more code down here'
?> Instead of jumping in and out of php for no apparent reason.
<? session_start(); ?>
<?
include 'db.php';
//session_checker();

?>
<?php
echo 'more code down here'
?>Most likely an error/warning/notice is being sent before the headers.Also, look in the HTML source. Do you see '<? session..' ? If so, short_tags has been turned off, and you need to use the full '<?PHP' tag opener.And what's on line 3 of your_ticket.php?Do you have Html headers there as well (ie on line 3) if so that session_start() needs to go above it, right at the start of the document.
 
Back
Top