[nycphp-talk] PHP/setcookie: Can someone work with me on cookies offsite here?
Phillip Powell
phillip.powell at adnet-sys.com
Fri Aug 27 13:20:47 EDT 2004
Daniel Kushner wrote:
>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, '/');
>
>-Daniel
>
>
This worked:
setcookie("$projectFolderName", '', time() - 86400, '/');
Apparently it simply couldn't find it, I left off '/'
Phil
>
>On Fri, 27 Aug 2004 13:08:56 -0400, Phillip Powell
><phillip.powell at adnet-sys.com> wrote:
>
>
>>Daniel Kushner wrote:
>>
>>
>>
>>>Hi Phil,
>>>
>>>It's not easy deleting session cookies (if that's what you're using,
>>>and don't confuse with PHP sessions). I would suggest changing their
>>>value to something like -1, 0, or false.
>>>
>>>
>>>
>>>
>>Change the cookie value? I can try that, I am using a session cookie
>>(as well as PHP sessions)
>>
>>setcookie("$projectFolderName", "$username", 0, '/');
>>
>>And upon deletion I do this:
>>
>>setcookie("$projectFolderName", '', time() - 86400);
>>
>>No dice though. :(
>>
>>Phil
>>
>>
>>
>>
>>
>>>-Daniel
>>>
>>>
>>>On Fri, 27 Aug 2004 12:35:18 -0400, Phillip Powell
>>><phillip.powell at adnet-sys.com> wrote:
>>>
>>>
>>>
>>>
>>>>I'd rather not bug the list with this but I've stumped even the superior
>>>>Chris Bielanski with this one..
>>>>
>>>>I am writing a logout.php script that simply deletes the cookie, deletes
>>>>the session variables and redirects.
>>>>
>>>>Right now, it only redirects. The cookie and session variables remain
>>>>intact in spite of my best efforts. I'm at a loss as to what to do at
>>>>this point so I'm appealing to higher minds on this one. Someone
>>>>contact me and I'll send the code for review and tell me what I did
>>>>wrong, please.
>>>>
>>>>Thanx
>>>>Phil
>>>>
>>>>--
>>>>---------------------------------------------------------------------------------
>>>>Phil Powell
>>>>Multimedia Programmer
>>>>BPX Technologies, Inc.
>>>>#: (703) 709-7218 x107
>>>>Fax: (703) 709-7219
>>>>
>>>>_______________________________________________
>>>>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
>>
>>_______________________________________________
>>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