session_destroy() in 4.0.2...do they work?
| From: | Shane McBride | Date: | Sat, 28 Oct 2000 22:51:58 +0000 |
| Subject: | session_destroy() in 4.0.2...do they work? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-22498@lists.php.net to get a copy of this message | ||
I use session_destroy on a page when a visitor leaves a certain area. When they leave the session is
still active.
I have tried it on two different platforms, the results are a little different, but either way the
session is still there.
Here's the platforms:
Platform 1:
Linux 2.2.16 (I think)
Apache 1.3.12
PHP 4.0.3pl1
Result: No errors, but session is still active
Platform 2:
Win 98SE
Xitami v2.4d6
PHP 4.0.2
Result: Session object destruction failed....
Here's the code snippet in question
//Track Session
session_start();
if ((!$PHPSESSID) || (!$item_count_total)) {
session_register("item_count_total");
}
if (!$item_count_total) {
$item_count_total = "0";
}
//Closes Session
session_destroy();
session_unregister("item_count_total");
I have looked at messages where several people talk about this, and the response is typically to use
cookies. I really don't want to to that.
No one ever seems to know why it doesn't work.
Any ideas on what the problem is?