Re: Odd session behaviour - plackup vs starman

Jonathan Swartz <[email protected]>
Newsgroups gmane.comp.web.mason.user
Message-ID <[email protected]>
Please keep replies on the mailing list, thanks.

You need to use $session->set and $session->get. Otherwise you are just setting the in-memory hash, which would only work in a single-process server like plackup.

You need to use the File store for the same reason - Starman has multiple processes.

HTH
Jon

On May 2, 2012, at 12:00 PM, Dane Buson wrote:

> builder {
>     # Include PSGI middleware here
>     enable 'Session';
>     $app;
> };
> 
> I tried using file Session, and didn't see different behavior.
> 
>       enable "Session", store => "File";
> 
> Versions:
> 
> Starman 0.3000
> Plack 0.9972
> 
> Thanks.
> 
> 
> On Wed, May 2, 2012 at 11:44 AM, Jonathan Swartz <[email protected]> wrote:
> How is the session middleware configured?
> 
> On May 2, 2012, at 10:58 AM, Dane Buson wrote:
> 
> > I'm having trouble where things I store in session work in Plackup, but not Starman.
> >
> > I'm getting an undefined for my $myid variable in Starman but not in Plackup.
> >
> > Code:
> >
> >
> >
> > <%init>
> >         my $session = $m->req->session;
> >         my $myid = $session->{myid};
> >
> > ------------------------------------------------------------------------------
> > Live Security Virtual Conference
> > Exclusive live event will cover all the ways today's security and
> > threat landscape has changed and how IT managers can respond. Discussions
> > will include endpoint security, mobile security and the latest in malware
> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
> > Mason-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/mason-users
> 
>

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.