session_destroy() doesn't work?
| From: | Cynic | Date: | Mon, 11 Sep 2000 05:09:06 +0000 |
| Subject: | session_destroy() doesn't work? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-16120@lists.php.net to get a copy of this message | ||
NT4 SP5 workstation
apache-1.3_20000831101201
DSO php4-200009101945
cookies enabled.
<?
session_start() ;
if ( isset( $HTTP_GET_VARS['a'] ) )
{
session_destroy() ;
} ;
session_register( 'x' ) ;
$HTTP_SESSION_VARS['x']++ ;
echo $HTTP_SESSION_VARS['x'] ;
?>
<br>
<a href="t.php">t.php</a><br>
<a href="t.php?a=1">t.php?a=1</a><br>
clicking on the t.php?a=1 link produces
Warning: Session object destruction failed in d:/__server__/www/cynic.cz/other/t.php on line 5
Warning: Constant sid already defined in d:/__server__/www/cynic.cz/other/t.php on line 7
Warning: Cannot send session cache limiter - headers already sent (output started at
d:/__server__/www/cynic.cz/other/t.php:5) in d:/__server__/www/cynic.cz/other/t.php on line 7
23 (24, 25...)
t.php
t.php?a=1
____________________________________________________________
Cynic:
A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.
cynic@mail.cz
ICQ: 2808 2505