[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mason
Subject:    Re: [Mason] %session global variable and tie into session cookies
From:       Perrin Harkins <perrin () elem ! com>
Date:       2005-02-15 20:31:57
Message-ID: 1108499517.5549.53.camel () localhost ! localdomain
[Download RAW message or body]

On Mon, 2005-02-14 at 15:44 -0800, Wendy Tan wrote:
> The include difference are 
> new: 
> use Apache2 ();
> use ModPerl::Registry();
> 
> old
> use Apache ()
> use Apache::Registry();

But how do you run your Mason code?  Are you using the Apache handler?
Maybe something in there behaves differently Apache 2.  I haven't looked
at it closely.

> Also I use the newest stable version MySQL 4.1.9. The MySQL version for
> mod_perl 1.2X and Apache 1.3 is 3.23.XX. Will it matter? 

It shouldn't.  Are you seeing any errors in the log about MySQL?

> I can access %session in the program but the value it saves sometimes
> show up and sometimes not and it's not associated with unique session
> ID either.

Usually that means you have a scoping problem where the session doesn't
go out of scope.  Keeping it in a global would definitely prevent it
from going out of scope unless you are explicitly undef'ing it somewhere
or calling the save() method on the tied object.

You also seem to be setting values two levels down, which doesn't work
unless you set something at the top level too, as it says in the
Apache::Session documentation.  Try just setting something like this:
$session{_update} = 1;

- Perrin



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic