[PHP] cookies on localhost WinXP

2003-07-30 Thread Steve Buehler
I have PHP/Apache/MySQL installed on my WinXP laptop. I do this so that I can write programs when not connected to the Internet (like when traveling). I am trying to set a cookie from the http://localhost site on my computer and it doesn't get set. Does this sound like something wrong in my

Re: [PHP] cookies on localhost WinXP

2003-07-30 Thread CPT John W. Holmes
I have PHP/Apache/MySQL installed on my WinXP laptop. I do this so that I can write programs when not connected to the Internet (like when traveling). I am trying to set a cookie from the http://localhost site on my computer and it doesn't get set. Does this sound like something wrong in

Re: [PHP] cookies on localhost WinXP

2003-07-30 Thread Steve Buehler
Sorry about that. Here is my code: if(isset($coach_access[login_id])){ }elseif(($lusername) ($lpassword)) { if(($lusername==me) AND ($lpassword==apass)){ $cookhost=$_SERVER[HTTP_HOST]; setcookie (coach_access[login_id],

Re: [PHP] cookies on localhost WinXP

2003-07-30 Thread Chris Shiflett
Can you try this example? Let's call the file cookie_test.php ? if (!empty($_COOKIE['test'])) { echo The test cookie was sent by the browser\n; } else { header('Set-Cookie: test=true'); echo Trying to set the test cookie.br /\n; echo a href=\./cookie_test.php\Test/a\n; } ? I

Re: [PHP] cookies on localhost WinXP

2003-07-30 Thread Steve Buehler
h. This seemed to set the cookie just fine. Does this mean that either localhost in the browser or Apache/PHP on a windows box has to set the cookie differently than on RedHat/Apache/PHP? I am going on vacation next week and need to keep working on a project that is working fine on the

Re: [PHP] cookies on localhost WinXP

2003-07-30 Thread CPT John W. Holmes
h. This seemed to set the cookie just fine. Does this mean that either localhost in the browser or Apache/PHP on a windows box has to set the cookie differently than on RedHat/Apache/PHP? I am going on vacation next week and need to keep working on a project that is working fine on the

Re: [PHP] cookies on localhost WinXP

2003-07-30 Thread Steve Buehler
hm. Looks like on my localhost I can't seta cookie like this: setcookie (coach_access[login_id], coach,0,/,$cookhost); if I change it to just: setcookie (coach_access_login_id, coach,0,/,$cookhost); it will work. But then my script won't work without a lot of re-writing because it uses

Re: [PHP] cookies on localhost WinXP

2003-07-30 Thread Chris Shiflett
--- Steve Buehler [EMAIL PROTECTED] wrote: h. This seemed to set the cookie just fine. I thought it might. :-) Does this mean that either localhost in the browser or Apache/PHP on a windows box has to set the cookie differently than on RedHat/Apache/PHP? Nope, it just means that the

Re: [PHP] cookies on localhost WinXP

2003-07-30 Thread CPT John W. Holmes
From: Steve Buehler [EMAIL PROTECTED] hm. Looks like on my localhost I can't seta cookie like this: setcookie (coach_access[login_id], coach,0,/,$cookhost); if I change it to just: setcookie (coach_access_login_id, coach,0,/,$cookhost); it will work. But then my script won't work

Re: [PHP] cookies on localhost WinXP

2003-07-30 Thread Chris Shiflett
--- Steve Buehler [EMAIL PROTECTED] wrote: header('Set-Cookie: coach_access[login_id]=coach'); Well, that is ugly, but it is actually a valid name. The name of a cookie, as described by http://wp.netscape.com/newsref/std/cookie_spec.html, is a sequence of characters excluding semi-colon, comma

Re: [PHP] cookies on localhost WinXP

2003-07-30 Thread Rob Adams
Cpt John W. Holmes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] From: Steve Buehler [EMAIL PROTECTED] hm. Looks like on my localhost I can't seta cookie like this: setcookie (coach_access[login_id], coach,0,/,$cookhost); if I change it to just: setcookie

Re: [PHP] cookies on localhost WinXP

2003-07-30 Thread Steve Buehler
That still won't work for me for some reason. I am just going to rewrite parts of the script to use a cookie name with out a [something] IN the name. I will rename it to ca_id or something like that. Thanks for your help Steve At 01:38 PM 7/30/2003 -0700, you wrote: --- Steve Buehler [EMAIL

Re: [PHP] cookies on localhost WinXP

2003-07-30 Thread Steve Buehler
At 04:37 PM 7/30/2003 -0400, you wrote: You'd be better of if you re-wrote your code to make it correct, but you could just put: $coach_access['login_id'] = $_COOKIE['coach_access[login_id]']; I guess I will rewrite my code. I still can't understand it working on the RedHat and not the Windows,

Re: [PHP] cookies on localhost WinXP

2003-07-30 Thread Curt Zirzow
* Thus wrote Chris Shiflett ([EMAIL PROTECTED]): --- Steve Buehler [EMAIL PROTECTED] wrote: header('Set-Cookie: coach_access[login_id]=coach'); Well, that is ugly, but it is actually a valid name. The name of a cookie, as described by http://wp.netscape.com/newsref/std/cookie_spec.html, is

Re: [PHP] cookies on localhost WinXP

2003-07-30 Thread Chris Shiflett
--- Curt Zirzow [EMAIL PROTECTED] wrote: Now, when a browser sends this, it will be something like this: Cookie: coach_access[login_id]=coach A cookie name can only be a HTTP/1.1 tolken as defined in rfc2109: Well, this isn't the case. You see, neither RFC 2109 nor RFC 2965 are