Sorry if I'm hijacking, but this sounds very similar to my problem... I just can't access session variables 🙁
I have this very simple code:
<?php
session_start();
session_register('count');
$count++;
echo "<p>You've been here $count times. Thanks!</p>";
?>
This gives me the error:
Notice: Undefined variable: count in c:\inetpub\wwwroot\count_me.php on line 10
and $count == 1 every time I access the page (reloading).
My problem seems to be that the browser cannot access the seession. I have checked the session files generated, and they look fine:
except for one fact: Each time I reload a new session is started, resetting the variables... 🙁
This worked fine home last night (Win2000/Omnihttpd/php4.2.3), but not here at work (Win2000/IIS5/php4.2.3). Is there something I have to turn on/activate in IIS5? 😕