NYCPHP Meetup

NYPHP.org

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

Chris Snyder csnyder at chxo.com
Thu Jul 31 13:33:50 EDT 2003


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




More information about the talk mailing list