Tried everything still getting...Cannot send session cache limiter - headers already sent

Go To StackoverFlow.com

0

I have searched google and stackoverflow for possible solutions and I believe I have tried everything and for some reason I am getting errors. I have not changed anything when previously was working :-s Please find the top block of PHP on my index page above.

Or visit my site to view it yourself - www.budgie.richardcmpage.com

 <?php
ini_set('session.cookie_httponly', '' );
echo ini_get('session.cookie_httponly');
session_start();    
if (isset($_SESSION['last_ip']) === false) {
    $_SESSION['last_ip'] = $_SERVER['REMOTE_ADDR'];
}    
if ($_SESSION['last_ip'] !== $_SERVER['REMOTE_ADDR']) {
    session_unset();
    session_destroy();
}

include 'functions/functions.php';    
?>
2012-04-04 21:08
by Ed Briscoe
and where exactly is line 4? do you know the reasons why those warning appears - magicianiam 2012-04-04 21:11
There was space behind the Ed Briscoe 2012-04-04 21:33
what i meant was do you know the rules of using sessions, like the ones stated below. be more careful when using sessions since they can be a bit tricky - magicianiam 2012-04-04 21:37


3

I think your problem is whitespace at first line:

 <?php

and echo at third:

echo ini_get('session.cookie_httponly');

which triggers the output and sends headers

2012-04-04 21:12
by Kyborek
I'm a total idiot, the automatic indent machine put spaces at the top!! - Ed Briscoe 2012-04-04 21:18
Ads