Re: _COOKIE[] unique?



newtophp2000@xxxxxxxxx wrote:
> I was wondering if the _COOKIE global is unqiue to each visitor or is
> it global across all visitor sessions? If it is truly global on the
> server side, is it possible that a cookie from one user's session may
> corrupt another user's session? How would I know which cookie goes
> with which user session/browser?
>

The _COOKIE variable is only global in the sence of being available in every
namespace without an explicit import (e.g. with the global keyword).

Each cookie created for a user is unique to that user because it's written
to his or her system. The browser adds a Cookie header to the request when
it finds a match on the local file system for a specific page.

When you create a cookie containing a user or session ID for user A, this
user's browser will send the ID back to the server when the appropriate page
is requested. Of course, when another user has access to user A's system and
browser, he or she will be recognized as user A while he or she isn't.


HTH;
JW


.



Relevant Pages

  • Re: _SESSION weirdness behind a NAT firewall/router: bug?
    ... that the 'sess_deleted' file is actually being used as a session ID. ... force the cookie to expire. ... Any $_SESSION values introduced by one browser become part of the ... I re-load the non-logged-in index page in Opera. ...
    (comp.lang.php)
  • Re: php session without cookie useage
    ... >>> browser or the application to maintain the state if needed. ... >>> transfer a session key created on login to subsequent pages via a POST ... >>> browser via a cookie or via POST or GET. ... > That may block legitimate users using a round-robin proxy (different ...
    (comp.lang.php)
  • Re: Is Session Always Cleared?
    ... If the first user closes his browser after he is finished, the session cookie is forgotten. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Detecting loss of session
    ... > a request. ... From what I've read on session cookies ... > sending) them as soon as they expire, not when the browser is closed? ... If you don't set the expiration on a Cookie, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Cookies , Session Which is Better ? and Global.asa Question
    ... YOU SHOULD NEVER STORE PERSONALLY IDENTIFIABLE INFORMATION IN A ... If you needed to store personal information in a cookie use non ... impossible - its much harder for me to hijack session information from ... The average time a session lasts is 20 mins. So, when your browser ...
    (microsoft.public.inetserver.asp.general)