Re: RE: How do I prevent a session from rebuilding itself?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/12/06, Daevid Vincent <daevid@xxxxxxxxxx> wrote:

> I am thinking you are killing the first session, rming the
> files, then
> creating a new session. At the end of the page the data that was in
> memory is getting written to the new session file.

Yes. That's what is happening as I said. I don't want it to re-write.


Just to be clear, what exactly are you trying to do?  Are you trying
to kill a session, as in log a person off?  Then do so within PHP:

[code]
	// set $_SESSION to empty array
	$_SESSION = array();

	// if saving session in cookie, clear that out too
	if(isset($_COOKIE[session_name()]))
	{
		setcookie(session_name(),'',time() - 4800,'/');
	}

	// destroy session completely
	session_destroy();
[/code]

HTH,
John W

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux