Win32/HTTP_SESSION_VARS problem
| From: | JMCAzurin | Date: | Wed, 27 Sep 2000 07:28:00 +0000 |
| Subject: | Win32/HTTP_SESSION_VARS problem | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-17701@lists.php.net to get a copy of this message | ||
Hello,
I'm running PHP 4.0.2 as an isapi dll under IIS 5.0. Here's my situation:
// firstpage.php
<?php
session_register("foo");
$foo = "foo_initial_value";
header("Location: secondpage.php");
?>
// end firstpage.php
// secondpage.php
<?php
session_start();
// no problem here; the if condition evaluates to 'true'
if(session_registered("foo")) {
// BUT this next line prints nothing if register_globals=off
print($HTTP_SESSION_VARS["foo"]);
}
?>
// end secondpage.php
If register_globals=off, session_register() does not seem to do its job.
If I switch it on, run the code (which then prints the expected value), then switch it back off, change the value of $foo (e.g., $foo="foo_new_value" in firstpage.php), and then re-run the code, the value printed is still "foo_initial_value". The changed value is not registered.
What might I be doing wrong? Or is this a bug?
Thanks in advance,
Mikah Azurin