Sessions broken
| From: | Stanislav Malyshev | Date: | Sun, 16 Jan 2000 14:03:57 +0000 |
| Subject: | Sessions broken | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-14677@lists.php.net to get a copy of this message | ||
Followup to locking problem with sessions - seems that sessions are not
finalized when exit() is called - i.e., problem is not in sessions but in
exit(). It also doesn't store sessions variables on exit - here is a
script that illustrates it:
<?php
session_name("Foo");
function start() {
global $count;
session_start();
thaw();
}
function thaw() {
session_register("count");
global $count;
print "Thawed: $count<br>";
}
function freeze() {
global $count;
session_register("count");
print "Frozen: $count<br>";
exit();
}
start();
$count++;
print "Counting: $count<br>";
freeze();
?>
This doesn't increment stored count, unless I remove exit(). Needless to
say, current behaviour breaks any script that relies on sesssions fatally.
--
Stanislav Malyshev stas@zend.com
+972-3-6139665