Hm, I just made a test application to test it. I included<br>
<br>
Session<br>
Session::Store::Memcached<br>
Session::State::Cookie<br>
<br>
in my app, added the following lines to app.yml<br>
<br>
session:<br>
&nbsp; cookie_domain: '.sin.my.office.com'<br>
&nbsp; memcached_new_args:<br>
&nbsp;&nbsp;&nbsp; data:<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - localhost:11211<br>
&nbsp; verify_address: 0<br>
<br>
and in Controller/Root.pm, default:<br>
<br>
&nbsp;&nbsp;&nbsp; $c-&gt;stash-&gt;{cookie_id}=$c-&gt;req-&gt;cookies-&gt;{id};<br>
&nbsp;&nbsp;&nbsp; $c-&gt;stash-&gt;{cookie_session}=$c-&gt;req-&gt;cookies-&gt;{session};<br>
<br>
&nbsp;&nbsp;&nbsp; delete @{ $c-&gt;session }{qw/__user/};<br>
&nbsp;&nbsp;&nbsp; delete @{ $c-&gt;session }{qw/id/};<br>
&nbsp;&nbsp;&nbsp; delete @{ $c-&gt;session }{qw/session/};<br>
&nbsp;&nbsp;  <br>
&nbsp;&nbsp;&nbsp; $c-&gt;res-&gt;cookies<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&gt;{id} = {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value =&gt; [],<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; expires =&gt; 0,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>
&nbsp;&nbsp;&nbsp; $c-&gt;res-&gt;cookies<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&gt;{session} = {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value =&gt; [],<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; expires =&gt; 0,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>
&nbsp;&nbsp;&nbsp; $c-&gt;req-&gt;cookies<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&gt;{id} = {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value =&gt; [],<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; expires =&gt; 0,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>
&nbsp;&nbsp;&nbsp; $c-&gt;req-&gt;cookies<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -&gt;{session} = {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; value =&gt; [],<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; expires =&gt; 0,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; };<br>
&nbsp;&nbsp;&nbsp; $c-&gt;stash-&gt;{template}='index.tt2';<br>
<br>
But the cookies just keep appearing, no matter how many times I refresh my browser.&nbsp; I think there is something wrong, but I just couldn't figure out where.<br>
Any ideas ? It couldn't be the memcached, could it ?<br>
<br>
Sindharta<br>
<br>
<b>Gabriel Vieira &lt;gabriel.vieira@gmail.com&gt;</b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> The content changes? If yes, maybe you're updating the cookies after<br>
the routine which should set it to a outdate value (the command you<br>
just sended). If no, you are not accessing the right cookie.<br>
<br>
On Mon, May 26, 2008 at 8:10 AM,  <sindharta_tanuwijaya@yahoo.co.jp> wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; We are currently building an add-on for a site, which was built by using<br>
&gt; CGI, while the add-on is made by using Catalyst.<br>
&gt; Let's say that the sessions in the old site can be maintained by this simple<br>
&gt; PHP program.<br>
&gt;<br>
&gt; &gt; setcookie("id", "sindharta", time() + 3600, "/", ".sin.my.office.com");<br>
&gt; setcookie("session", "blablablablablabla", time() + 3600, "/",<br>
&gt; ".sin.my.office.com");<br>
&gt; echo "cookies...\n";<br>
&gt; print_r($_COOKIE);<br>
&gt; echo "set!";<br>
&gt; ?&gt;<br>
&gt;<br>
&gt; As you probably know, that's to set the login id, and you'll notice that I<br>
&gt; am not using Catalyst::Plugin::Authentication. Now, in the new add-on, I<br>
&gt; want to have a logout button so that the user can log out directly too, but<br>
&gt; I am having difficulty in programming that.<br>
&gt;<br>
&gt; I  have tried things such as:<br>
&gt; --<br>
&gt;     delete @{ $c-&gt;session }{qw/id/};<br>
&gt;     $c-&gt;res-&gt;cookies<br>
&gt;         -&gt;{$cookie_name} = {<br>
&gt;             value =&gt; [],<br>
&gt;             expires =&gt; 0,<br>
&gt;         };<br>
&gt;<br>
&gt;     my $cookies = fetch CGI::Simple::Cookie;<br>
&gt;     $cookies-&gt;{session}-&gt;value([]);<br>
&gt;     $cookies-&gt;{id}-&gt;value([]);<br>
&gt; --<br>
&gt;<br>
&gt; But the cookie just won't disappear, it keeps coming back so that although I<br>
&gt; have pressed logout button, I am still considered as "login".<br>
&gt; Any ideas what went wrong here ?<br>
&gt;<br>
&gt; Sindharta<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; ________________________________<br>
&gt; GANBARE! NIPPON! Win your ticket to Olympic Games 2008.<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; List: Catalyst@lists.scsys.co.uk<br>
&gt; Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst<br>
&gt; Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/<br>
&gt; Dev site: http://dev.catalyst.perl.org/<br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
-- <br>
Gabriel Vieira<br>
<br>
_______________________________________________<br>
List: Catalyst@lists.scsys.co.uk<br>
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst<br>
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/<br>
Dev site: http://dev.catalyst.perl.org/<br>
</sindharta_tanuwijaya@yahoo.co.jp></blockquote><br>

<div style="line-height: 0; width: 0; height: 5px; clear: both;">&nbsp;</div>
<p>&#32;



<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>