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".

I'm still not sure why this works differently under mod_perl.

Semi-related to this, isn't $cgi->cookie just an API which
uses $ENV{HTTP_COOKIE}?

What's the big advantage of Apache::Cookie?

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.

Thanks.

- Mark
  www.fantasycup.com
----------------------------------------

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]

Reply via email to