[nycphp-talk] PHP/setcookie: Can someone work with me on c ookies offsite here?
Phillip Powell
phillip.powell at adnet-sys.com
Fri Aug 27 13:47:36 EDT 2004
That was a very simple solution to the cookie problem, however, it
doesn't help solve the problem with deleting session variables. I don't
want to use session_destroy() as I wish to keep the session.
The session itself will be a collection object containing elements from
several different projects on the same domain. I want to delete the
session variables ONLY that pertain to the CMA project, not the XYZ
project or the ABC project.
This did not work:
foreach ($_SESSION as $key => $val) {
if (preg_match("/^${projectFolderName}_/i", $key)) unset($_SESSION[$key]);
}
This did no change to the session whatsoever.
Phil
Chris Bielanski wrote:
>Okay, disregard my last comment - glad you got it solved Phil.
>Personally I don't make use of cookies, so I hadn't much experience with the
>problem. If in the future I'm so required, I'll be sure to watch out for
>this :)
>
>
>Thanks,
>Chris Bielanski
>Web Programmer,
>International Trademark Association,
>1133 Avenue of the Americas, 33rd Floor
>New York, NY 10036
>+1 (212) 642-1745, f: +1 (212) 768-7796
>mailto:cbielanski at inta.org, www.inta.org
>INTA -- 125 Years of Excellence
>
>
>
>
>
>>-----Original Message-----
>>From: Chris Bielanski [mailto:Cbielanski at inta.org]
>>Sent: Friday, August 27, 2004 1:21 PM
>>To: 'NYPHP Talk'
>>Subject: RE: Re: [nycphp-talk] PHP/setcookie: Can someone work
>>with me on
>>c ookies offsite here?
>>
>>
>>Oh man, wouldn't that mean that IE users won't be logged out until the
>>browser restarts?
>>
>>Mother of *suck.*
>>
>>
>>Thanks,
>>Chris Bielanski
>>Web Programmer,
>>International Trademark Association,
>>1133 Avenue of the Americas, 33rd Floor
>>New York, NY 10036
>>+1 (212) 642-1745, f: +1 (212) 768-7796
>>mailto:cbielanski at inta.org, www.inta.org
>>INTA -- 125 Years of Excellence
>>
>>
>>
>>
>>
>>>-----Original Message-----
>>>From: Daniel Kushner [mailto:kushner at gmail.com]
>>>Sent: Friday, August 27, 2004 1:10 PM
>>>To: NYPHP Talk
>>>Subject: Re: Re: [nycphp-talk] PHP/setcookie: Can someone work
>>>with me on
>>>cookies offsite here?
>>>
>>>
>>>This is how IE handles cookies - I'm not too sure about other
>>>browsers.
>>>
>>>The session cookies aren't stored on the clients file system but in
>>>memory only. Non-session cookies are stored on the file system. When
>>>you set your cookie with a '0', the data is in memory, and
>>>
>>>
>>when you're
>>
>>
>>>doing "time() - 86400", it's on the file system. Try
>>>setcookie($projectFolderName, '', 0, '/');
>>>
>>>
>>>
>>_______________________________________________
>>New York PHP Talk
>>Supporting AMP Technology (Apache/MySQL/PHP)
>>http://lists.nyphp.org/mailman/listinfo/talk
>>http://www.newyorkphp.org
>>
>>
>>
>_______________________________________________
>New York PHP Talk
>Supporting AMP Technology (Apache/MySQL/PHP)
>http://lists.nyphp.org/mailman/listinfo/talk
>http://www.newyorkphp.org
>
>
>
--
---------------------------------------------------------------------------------
Phil Powell
Multimedia Programmer
BPX Technologies, Inc.
#: (703) 709-7218 x107
Fax: (703) 709-7219
More information about the talk
mailing list