On 12/6/05, Senthil Nathan <rs...@gm...> wrote:
> I see that the session is created and the session_id is sent as a cookie.
> But when I store a value in the session with a key and try to load anothe=
r
> page and the same session is loaded but the data is lost. The same
> application worked well on cgi/perl. But with mod_perl i see the session
> data is lost.
This usually means that your session object is not going out of scope.
The session object doesn't write out it's changes to the data store
until the session object is destroyed. In mod_perl, since the process
is persistent across multiple requests, it is possible to create a
global variable that never goes out of scope, and hence your session
data is never written out to the store.
You can either put an explicit $session->flush (or $session =3D undef;)
at the end of your code somewhere, or you can try to figure out why
your session object is not going out of scope.
Cheers,
Cees
|