Re: cookie bug
| From: | andreas \(@work\) | Date: | Wed, 23 Aug 2000 07:28:17 +0000 |
| Subject: | Re: cookie bug | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-13104@lists.php.net to get a copy of this message | ||
hi
a session cookie is deleted automatically when you quit the browser
the other cookie is valid for the given time [ time()+10800 ]
.... if there are not other reasons force the browser to delete your
cookie
( 20 cookies per domain, .... )
so this is maybe also the eason for all that.
andreas
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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net