I was going absolutely NUTSO trying to get some 'session' based stuff working here on my ISP's AIX Unix. Lots of people helped from several forums.
As it turned out, the major problem here was that my ISP did NOT compile PHP with sesssion.use_trans_id turned ON.
The workaround (for my local user use) was they put an .htaccess file in place with the following line in it:
php_flag session.use_trans_sid 1
Now, my ISP runs with PHP 'register_globals OFF', but once this change was made, everything works flawlessly based upon using the following on EACH page:
...at the top...
ob_start();
session_start();
$sessid = session_id();
...and at the bottom...
ob_end_flush();
And if you are going to do header redirects to another page after a self/post submit, use this:
if (isset($_POST['submit'])) {
$_SESSION['blah1'] = $_POST['blah1'];
$url = "blah2.php" . "?" . session_name() . "=$sessid";
header("Location: $url");
}
'blah1' is, of course, a Pseudo fieldname & 'blah2' a filename
It took about 40 hours of frustrating experimentation to get this all working, so hopefully this will help!!!:p