Re: cookie bug
| From: | Mark Lo | Date: | Wed, 23 Aug 2000 01:40:25 +0000 |
| Subject: | Re: cookie bug | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-13060@lists.php.net to get a copy of this message | ||
Hi,
Yes, I did have different user's profile. However, what is the
different between session cookies, and others that u just mentioned.
1. setcookie("useruser","$values",time()+10800,".domain.com",0);
2. setcooke("useruser","$values");
For the first method, only .domain.com can access the value of the cookie,
is that right?
For the second method, any one can access the value of the cookie, is that
right?
What is the different between the two?
Thank you
Mark Lo.
----- Original Message -----
From: Andreas Pour <pour@mieterra.com>
To: Mark Lo <markloky@netvigator.com>
Cc: php general <php-general@lists.php.net>
Sent: Wednesday, August 23, 2000 4:51 AM
Subject: Re: [PHP] cookie bug
> Mark Lo wrote:
> >
> > Hi,
> >
> > I might facing a cookie bug problem in PHP4. I set the cookie with
the following syntax.
> >
> >
> > setcookie("useruser","$values",time()+10800,".domain.com",0);
> >
> > the $values of the cookie is acquired from the login page.
> >
> > I have tried to login from two browsers at the same machine. The first
browser, I login as mark. so the cookie value is mark. The second browser,
I login as Eric, so the cookie value is eric. Now I am trying to retrive
the values of the cookie from the two browser, and one of the browser 's
cookie value is being changed. I mean the two browser at the same machine
having the same values....like mark....or like Eric. I wonder is this a
bug.?? if no, what did i do wrong.??
> >
> > On the other hand, If I set the cookie with
"setcooke("useruser","$values");
> > Then, It works perfectly, no replacement occured. Can anyone tell me
what is happening.
>
> Not sure, but do you have different user profiles? In the second case
> you use session cookies so they are not written to a file; in the first
> case they are, so if your browsers are bothing using the same cookie
> file that would explain it.
>
> Ciao,
>
> Andreas