Session_destroy
| From: | Shane McBride | Date: | Fri, 05 Jan 2001 21:38:30 +0000 |
| Subject: | Session_destroy | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-32950@lists.php.net to get a copy of this message | ||
I can not seem to destroy a session. Maybe I'm looking for the wrong result. I expect the
session file to be deleted.
Here's the most basic form of code I can come up with:
<?
echo $PHPSESSID;
session_start();
session_destroy();
echo $PHPSESSID;
?>
I try it on both Apache/Linux and Win98/Xitami and I get strange results:
dbf951eb1ad2ec71975a1a2aaa0b776a
Warning: Cannot send session cache limiter - headers already sent (output started at
d:/sites/php/session_destroy.php:12) in d:/sites/php/session_destroy.php on line 14
Warning: Session object destruction failed in d:/sites/php/session_destroy.php on line 15
dbf951eb1ad2ec71975a1a2aaa0b776a
I also tried to not start the session, but that fails miserably.
I have never been able to get this to work correctly. I could find a ton of uses for it.
TIA,
Shane