NYCPHP Meetup

NYPHP.org

[nycphp-talk] TCL, PHP and cookies - AUGH!

Phil Powell soazine at erols.com
Thu Jul 31 13:41:05 EDT 2003


It doesn't show up in the $env list (that is, 'username'), however
'valIdentifier', another cookie in the same domain, does show up in $env.

I don't know the syntax for passing a cookie into my HTTP_GET TCL proc, does
anyone?

Phil
----- Original Message -----
From: "Chris Snyder" <csnyder at chxo.com>
To: "NYPHP Talk" <talk at lists.nyphp.org>
Sent: Thursday, July 31, 2003 1:33 PM
Subject: Re: [nycphp-talk] TCL, PHP and cookies - AUGH!


> I think that because TCL is making the request to get_cookie.php, there
> is no cookie being passed.
> The cookie is only passed by the client broswer.
>
> The key to finding the cookie in TCL might be the $env list?
>
>   chris.
>
> Phil Powell wrote:
>
> >TCL:
> >set hasFoundCMACookie 0
> >set hasFoundCMACookie [string trim [COMPACT_HTML [HTTP_GET
$env(SERVER_NAME)
> >80 /cma/get_cookie.php?junk=[RAND_STRING] {} {}]]]
> >
> >PHP (get_cookie.php):
> ><html>
> ><head>
> ><meta http-equiv=Pragma content="No-cache">
> ></head>
> ><body>
> ><?
> >
> >  if (strtolower($HTTP_COOKIE_VARS["username"]) === "admin") {
> >   echo '1';
> >  } else {
> >   echo '0';
> >  }
> >
> >?>
> ></body>
> ></html>
> >
> >The TCL proc I wrote, HTTP_GET, works, it gets the contents of
> >get_cookie.php and returns them.  However, it has constantly returned 0,
> >even if the cookie is found.  If I go directly to get_cookie.php, I get
the
> >correct value of 1 instead.
> >
> >I'm absolutely stumped as to what to do.  This sounds like another
caching
> >issue on the part of get_cookie.php but I have no solution for it.
> >
> >Thanx
> >Phil
> >
> >_______________________________________________
> >talk mailing list
> >talk at lists.nyphp.org
> >http://lists.nyphp.org/mailman/listinfo/talk
> >
> >
>
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk




More information about the talk mailing list