Hi, Am Donnerstag 27 Mai 2004 11:39 schrieb Casey Songer: > I've been running site using mod_perl and HTML::Mason for 3-4 years with > few problems. I recently am being asked to move everything to a new box > that has Apache2 running on it (with mp2). I was able to install and > get everything running for a site with no sessions and everything seems > to be working fine. For another site, I was using Apache::Cookie for > session management. I tried using the same code as for with mp1 with > just changing the parse call to fetch (see code below). The cookies > aren't working. As far as I can tell, cookie->new() is failing in > Apache/Session/Generate/MD5.pm in the validate() function. I guess my > question is first of all, am I going about this the right way? (It's > been a while since I set up the original mp1 cookies code). Are people > using the new Apache::Cookie (libapreq2)? The documentation I've been > able to find for it is pretty sparse so far. Can somebody point me to > some source code or better documentation than what I have found so far? > > Here are the versions of stuff I am using: > Apache: 2.0.49 > mod_perl: 1.99_13 > libapreq2: 2.02_02 >
Use a more recent version of libapreq2 since at least up to libapreq2 2.02_02 the cookies expire way to early. It is fixed in cvs. Or here a version I used some time ago and build errors fixed ;-) . http://eg.2bz.de/httpd-apreq-2-19042004.tar.gz Your code looks fine, but perhaps you use a wrong $r? Try $r->env but this is just a guess. > my $cookie = Apache::Cookie->new($r, ... my $cookie = Apache::Cookie->new($r->env, ... >my $cookies = Apache::Cookie->fetch($r); my $cookies = Apache::Cookie->fetch($r->env); -- Boris -- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html