tags:

views:

156

answers:

1

My case is very simple, but I've read through many posts and tried the suggestions but can't seem to figure this one out....

session's variables are not passed to the next page in IE6. Every page refresh creates a new session_id().

I'm using wamp/IE6, no software blocking cookies, and the privacy setting is set to Medium... I know i can pass the PHPSESSID to the next page, but security issues would not allow this method.

This code is an example of what I'm trying to do, it works fine in Firefox... here are the basics:

t1.php

<?php
session_start();
error_reporting(E_ALL);
ini_set("display_errors", -1);

$mysession = session_id();
print_r($mysession);

print "<br>";
$_SESSION['test']="test";
print "<a href='t2.php'>t2</a>";
print "<br>";

$_SESSION['firstname'] = 'charlie';
print_r($_SESSION['firstname']);
print "<br>";
?>

The output for t1.php i.e.

ing0t5cn53kfa2ptb6l8duppa6
t2
charlie 

t2.php

<?php
session_start();
$mysession = session_id();
print_r($mysession);

print "<br>";
print_r($_SESSION);

print "<br>";
print_r($_SESSION['test']);

print "<br>";
print_r($_SESSION['firstname']);
?>

the output for t2.php i.e.

bh9ueqb61gk3mriq5f3bem4jj1
Array ( ) 
Notice: Undefined index: test in C:\wamp\www\test\t2.php on line 10
Notice: Undefined index: firstname in C:\wamp\www\test\t2.php on line 13

IE6 creates a new session_id in the next page, so the session variables are tagged with undefined index...

Can someone show me how to resolved this? thanks

+1  A: 

Try using a web debugging proxy such as Fiddler. This will show you exactly what cookie headers are being sent back and forth and may shed some light on the situation. Simply running Fiddler will by default cause all IE6 traffic to pass through.

pix0r
I'm going to get Fiddler and see what I can see in the traffic... thanks