Hi,
Well I did try printing the value for $cookie and gives me the foll value:
EMBPERL_UID=df9c7b02f04343807ef7ab570ab43dc6; SESSION_ID=97f3d8207d2e8d9afd7493ca28c3908a; BIGipServerwebster2=593498284.20480.0000
Also, while trying to retrieve the session, I tried supplying the following values for $cookie:
1) EMBPERL_UID=df9c7b02f04343807ef7ab570ab43dc6; SESSION_ID=97f3d8207d2e8d9afd7493ca28c3908a; BIGipServerwebster2=593498284.20480.0000
2) EMBPERL_UID=df9c7b02f04343807ef7ab570ab43dc6; 97f3d8207d2e8d9afd7493ca28c3908a; BIGipServerwebster2=593498284.20480.0000
3) 97f3d8207d2e8d9afd7493ca28c3908a
But, each time, I get the same error , i.e.
Died at /usr/local/ext/perl/5.8.0/lib/site_perl/Apache/Session/Generate/MD5.pm line 40.
Let me know what do you think. Is it an issue with cookie or with retrieving sessions ? Also, what value needs to be supplied for $cookie while trying to retrieve a session.
tie %session, 'Apache::Session::File', $cookie,
tie %session, 'Apache::Session::File', $cookie,
{ Directory => './tmp/sessions' ,
LockDirectory => './var/lock/sessions' ,
};
Your help is really appreciated.
Thanks & Best Regards,
Dhaval Gada.
On 8/30/06, Perrin Harkins <[EMAIL PROTECTED]> wrote:
[ Please keep replies on the mailing list ]
On Wed, 2006-08-30 at 09:29 -0400, dhaval gada wrote:
> If its the 1st time... then the following code. (i.e. session
> creation)
>
> [-
> eval {
> tie %session, 'Apache::Session::File', undef,
> { Directory => './tmp/sessions',
> LockDirectory => './var/lock/sessions',
> };
> };
> if ($@) {
> die "Global data is not accessible: $@";
> }
>
> $session{"manpage"} = new BFM::ManPage();
> $session{"visit"} = '1 all';
> $tp = yes;
>
> my $session_cookie = "SESSION_ID=$session{_session_id};";
> $r->header_out("Set-Cookie" => $session_cookie);
> -]
Okay, and you said that seemed to work. I'd be nervous about your use
of relative directories in those path names, personally.
> And if not the 1st time... then the following code.(i.e. retrieving
> established session)
> [-
> $r = Apache ->request;
> $cookie = $ r->header_in('Cookie');
> $ cookie =~ s/SESSION_ID=(\w*)/$1/;
>
> eval { tie %session , 'Apache::Session::File', $cookie,
> { Directory => './tmp/sessions',
> LockDirectory => './var/lock/sessions',
> };
> };
>
> if ($@)
> { die "Global data is not accessible: $@"; }
> -]
And that's where it dies on you? Have you checked the value of $cookie
inside that eval? Maybe it isn't what you think it is.
- Perrin