3
OK, that didn't work. Here's what happened.
I presume the session test is the one you mean - but I did the cookie test too - cookies are fine.
I copied/pasted the code for the two session tests exactly. I presume the referenced missing backslashes have been repaired...I didn't find any errors. The lines that wrap below are fine in the code.
Uploaded files to server. Filenames checked and rechecked.
setsession.php generated an error. Opera says the page is missing, IE8 gives a 500 error. Here is the exact code in the file:
session_start ();
$ok = session_regenerate_id ();
$sid = session_id ();
$_SESSION ['MyCMS'] = "XOOPS";
?>
Session test 1
Session created.
Session id regenerated: print "$ok"; ?>
Session variable MyCMS set: print $_SESSION ['MyCMS']; ?>
Session id: print "$sid"; ?>
print "tstsession.php?sid=$sid">Check session variables";
?>
and for tstsession.php
$sid = $_GET ['sid'];
session_id ($sid);
session_start ();
?>
Session test 2
Session Info
Session id: print "$sid"; ?>
Session variable MyCMS: print $_SESSION ['MyCMS']; ?>
The tstsession.php returns:
Quote:
Session Info
Session id:
Session variable MyCMS:
OK. So, I googled "PHP sessions not working" and I get tons of hits - some exact. I think we are on to something.
I tried another test I found online:
test2.php
session_start();
$variable = 3;
session_register("variable");
$variable++;
header ("location: next.php");
exit;
?>
Running this does not generate an error, it does go to next.php. And next.php:
session_start();
session_register("variable");
echo $variable;
?>
This however does not echo a variable on the screen - I get a blank screen.
Thanks for your help! What next? I am cc'ing my site support on this message.