Re: Session_destroy

From: Date: Fri, 05 Jan 2001 22:45:51 +0000
Subject: Re: Session_destroy
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32969@lists.php.net to get a copy of this message
The session cookie is set as part of the header. So You have to make sure nothing has been sent to the browser before you call session_destroy(). "Shane McBride" <php@riversidedesigns.net> wrote in message news:007001c0775f$dc3a9880$f4a00718@abdn1.md.home.com... 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

« previous php.general (#32969) next »