At 23:55 10.06.2002, Mark Korey wrote:
>We found the problem ... this was an odd one (aren't most!?!).
>Turns out that the path (i.e. $cgi->cookie(-path =>'/', ...); )
>was NOT being set. Guess we assumed that CGI.pm would default it to '/'.
>Setting that seemed to do the trick.
>We are using CGI.pm and did not need to "PerlSetupEnv On".
It's the default to have it On, that's why it got me wondering.
>I'm still not sure why this works differently under mod_perl.
Probably not mod_perl's fault at all, you might have been using a different
path before (or maybe a different vresion of CGI.pm?)
>Semi-related to this, isn't $cgi->cookie just an API which
>uses $ENV{HTTP_COOKIE}?
CGI.pm has mod_perl-related code under the hood. I'm not sure if the same
applies to CGI::Cookie (which is used for $cgi->cookie).
>What's the big advantage of Apache::Cookie?
It's C, so it's faster. It uses the Apache API. You won't have to do things
like print $cgi->header(-cookie => ...), you just do $cookie->bake; But
basically, you don't need it yet.
>I'd like to keep my code as flexible & compatible as possible
>so it will run under both standard CGI & mod_perl, at least
>while we work the kinks out of our mod_perl configuration.
In that case, just keep your current code. You'll only have the use for the
likes of Apache::Cookie when you start moving to the Apache Perl API anyway.
>On Mon, 10 Jun 2002, Per Einar Ellefsen wrote:
>
> > At 05:43 10.06.2002, Mark Korey wrote:
> > >ENV{HTTP_COOKIE} does not contain a newly set cookie, often it
> > >still contains an old value when I try to change it (ie switch to a
> > >different user).
> > >Everything else appears to be working fine.
> >
> > If you're saying that $ENV{HTTP_COOKIE} is empty, you should set
> > "PerlSetupEnv On" in your Location section. See
> > http://perl.apache.org/release/docs/1.0/guide/config.html#PerlSetupEnv
> >
> > Could we see your code (an excerpt showing the problem)? You might be doing
> > something wrong when trying to set cookies. Furthermore, you should really
> > be using CGI.pm, CGI::Cookie or Apache::Cookie for your cookie needs.
--
Per Einar Ellefsen
[EMAIL PROTECTED]