w00t!

ttms_user: mp2Ti5p1JkhCObm9LKBFGsiAltop8aAWwl6vLLDr/3rtb09MRzZrEg==

Here,

        your $cookie = Apache::Cookie->new($state->{r},
                -name           => 'Mark',
                -value          => 'AWESOME!!!',
                -expires        => time + 86400*30*7,
                -domain         => '.dyndns.org',
                -path           => '/',
        );

(okay, I made up "your", it sounds better than "my", and sinec this is fake
nayways... heh)

oop, looking at that, I should set the domain to something more sane again,
like stout.dyndns.org.  :P

Dennis

P.S. Does anyone else try to use Outlook Express like vi and get odd error
messages after a days worth of coding?

----- Original Message ----- 
From: "Mark Maunder" <[EMAIL PROTECTED]>
To: "Dennis Stout" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, July 16, 2003 20 33
Subject: Re: cookies


> >From perldoc CGI::Cookie
> # fetch existing cookies
> %cookies = fetch CGI::Cookie;
> $id = $cookies{'ID'}->value;
> #You're doing $cookies->value;
>
> ID == the name that you used when you set the cookie.
>
> On Wed, 2003-07-16 at 21:27, Dennis Stout wrote:
> > *pounds head against brick wall*  why must it work against meeeee???
> >
> > A cookie for anyone who solves this.
> >
> > sub handler {
> >         my $r = shift;
> >         my $result = undef;
> >
> >         eval { $result = inner_handler($r) };
> >         return $result unless $@;
> >
> >         warn "Uncaught Exception: $@";
> >
> >         return SERVER_ERROR;
> > }
> >
> > sub inner_handler {
> >         my $r = shift;
> >
> >         my %q = ($r->args, $r->content);
> >         my %state = (r => $r, q => \%q);
> >
> >         $state{title} = '';
> >         $state{template} = '';
> >         $state{auth_status} = password_boxes(\%state);
> >
> > #       warn "%ENV: \n";
> > #       foreach (keys %ENV) {
> > #               warn "$_ => $ENV{$_}\n";
> > #       }
> > #       my %headers = $r->headers_in;
> > #       warn "Headers: \n";
> > #       foreach (keys %headers) {
> > #               warn "$_: $headers{$_}\n";
> > #       }
> >         my $cookie = Apache::Cookie->fetch;
> >         warn "z - $cookie->value";
> >         validate_auth_cookie(\%state, $cookie);
> >
> >         my $function = $r->uri;
> >         if (($state{login_user} eq '') and ($function ne '/login.cgi')) {
> >                 $function = '/login.html';
> >         }
> >         my $func = $Dispatch{$function} || $Dispatch{DEFAULT};
> >
> >         return DECLINED unless $func;
> >         return $func->(\%state);
> > }
> >
> > Upon accessing a page (therefore generating lots of warning info in
logs...) I
> > get this in my error log.
> >
> > z - HASH(0x916ea08)->value at /home/httpd/ttms/perl/RequestHandler.pm line
> > 108.
> >
> > (the z is there so I know where at in my code the line in the log file is
> > being generated.  I like z's and a's more than I do
> > "some/long/path/and/filename line 108")
> >
> > I have tried using $cookie as a value in and of itself, I've tried
> > $cookie->{ttms_user}  (the name of hte cookie is ttms_user), I've tried
> > changing $cookie to %cookie and doing a $cookie{ttms_user} ..
> >
> > I might break down, declare this a bug, and use $ENV{HTTP_COOKIE} instead.
> >
> > Any ideas how to fix this to return to me the cookie itself?  Thanks.
> >
> > Dennis
> >
> > ----- Original Message ----- 
> > From: "Dennis Stout" <[EMAIL PROTECTED]>
> > To: "Dennis Stout" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Sent: Wednesday, July 16, 2003 20 13
> > Subject: Re: cookies
> >
> >
> > > Well I'll be damned.
> > >
> > > My computer at home does the cookie thing perfectly well.  My
workstation at
> > > work does not do cookies.  So my mod_perl creation is working fine as
far as
> > > getting the cookies.
> > >
> > > <rant>
> > > YAY FOR WIN2K DOMAINS AND ADMIN WHO USE HELP DESK TECHS TO PROGRAM
TICKETING
> > > SYSTEMS FOR DSL, DIGITAL TV, AND DOMAINS!
> > > </rant>
> > >
> > > I still have a problem tho.  The cookie string itself is not being
passed
> > > along.  Instead, I am getting Apache::Cookie=SCALAR(0x9115c24).
> > >
> > > I imagine somewhere I need to do something like ->as_string or
something.
> > > blah....
> > >
> > > Thanks for helping, sorry I didn't spot that the error was infact, in
the
> > > dumbterminal called a win2k box I was using, and not in any actual
code....
> > >
> > > Dennis Stout
> > >
> > > ----- Original Message ----- 
> > > From: "Dennis Stout" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Wednesday, July 16, 2003 13 13
> > > Subject: cookies
> > >
> > >
> > > > Okay, so technically this isn't really "mod_perl" speific...  but the
> > cookie
> > > > is being set with mod_perl and it's a huge mod_perl program being
affected
> > > by
> > > > this:)
> > > >
> > > > I have a cookie, the domain is set to .stout.dyndns.org (with the
leading
> > > .).
> > > >
> > > > I set the cookie just fine now (thanks to those helping me on thatr)
> > > >
> > > > I had a problem parsing the cookie.  Added some debugging (okay, warn
> > lines
> > > up
> > > > the yingyang) and after cycling through the headers and warning them
out
> > to
> > > > the errorlog...  I never saw any cookie info.
> > > >
> > > > So... If the website is ttms.stout.dyndns.org shouldn't the cookie
domain
> > be
> > > > .stout.dyndns.org?
> > > >
> > > > *sigh*  6 more days to finish this database.....  I doubt I'll make
it.
> > > >
> > > > Dennis
> > > >
> > >
> -- 
> Mark Maunder <[EMAIL PROTECTED]>
> ZipTree Inc.
>

Reply via email to