Hi,<br>
<br>
We are currently building an add-on for a site, which was built by using CGI, while the add-on is made by using Catalyst. <br>
Let's say that the sessions in the old site can be maintained by this simple PHP program.<br>
<br>
<?php<br>
setcookie("id", "sindharta", time() + 3600, "/", ".sin.my.office.com");<br>
setcookie("session", "blablablablablabla", time() + 3600, "/", ".sin.my.office.com");<br>
echo "cookies...\n";<br>
print_r($_COOKIE);<br>
echo "set!";<br>
?><br>
<br>
As you probably know, that's to set the login id, and you'll notice that I am not using Catalyst::Plugin::Authentication. Now, in the new add-on, I want to have a logout button so that the user can log out directly too, but I am having difficulty in programming that.<br>
<br>
I have tried things such as:<br>
--<br>
delete @{ $c->session }{qw/id/};<br>
$c->res->cookies<br>
->{$cookie_name} = {<br>
value => [],<br>
expires => 0,<br>
};<br>
<br>
my $cookies = fetch CGI::Simple::Cookie;<br>
$cookies->{session}->value([]);<br>
$cookies->{id}->value([]);<br>
--<br>
<br>
But the cookie just won't disappear, it keeps coming back so that although I have pressed logout button, I am still considered as "login".<br>
Any ideas what went wrong here ?<br>
<br>
Sindharta<br>
<br>
<div style="line-height: 0; width: 0; height: 5px; clear: both;"> </div>
<p> 
<hr size=1><a href=http://pr.mail.yahoo.co.jp/ganbare-nippon/ target="new">GANBARE! NIPPON! Win your ticket to Olympic Games 2008.</a><br>