Thank you for the help,
JM
Well, it's non-trivial, but this is what I use and it works well enough.
I got this off a post from usenet a couple of years ago... I wish I
remember from who.
// the next four lines kill the session,
// the cookie, and the horse they rode in on.
session_unset();
session_destroy();
$p = session_get_cookie_params();
setcookie(session_name(), "", 0, $p["path"], $p["domain"]);
Hope this helps.
-burk
--
<?php while ($awake) { code() } ?>
session_destroy() does do what you want. However, what it seems you are
experiencing is that the stale session file is still residing on the
server. This is because the garbage collection routine (the one that
deletes old session files) has not run.
In php.ini, the session.gc_probability has a default value of 1. This
means that 1% of the time that a session_start() is called (or implied)
the gc routine runs. This will leave files on the server for a quite a
while of you don't have a lot of traffic.
You can change this value to something bigger to get rid of the files
more often. I'm sure there is going to be a performance hit on a
high-traffic site, so you will need to consider that as well. You don't
have to change the setting in php.ini, you can do it in your script with:
ini_set('session.gc_probability','70');
where 70 is the value that you want to use. You'll propabally want to
experiment with the setting to find the optimal trade-off between
performance and functionality according to your application and traffic.
--
<?$a=array(306%200,100+17,130-15,232/2,1.05*100,11*10,10*10+7,8*8,
119%100+100,100-3,100+2,21*5,11.5*10,10*4+8*8,50+51,(.14+1)*100,
709%600,1100/10,23*2,33*3,888/8,109);$b='';while(list(,$c)=@each($a))
$b.=sprintf("%c\n",$c);echo str_replace("<br />\n",'',nl2br($b));?>