From: Bruce R. <its...@uk...> - 2002-12-16 07:38:58
|
On Mon, Dec 16, 2002 at 12:12:28AM -0600, Jonathan Angliss wrote: > This is most unusual. PHP says you can remove a cookie just by > providing it's name, or setting it's time back in time to cause the > browser to expire it. I guess they incorrectly stated that then. I'll > update the code appropriately. Thanks. The online PHP documentation states "Cookies must be deleted with the same parameters as they were set with". You have to use the same path as was used to create the cookies, otherwise you are not deleting the old ones but creating new, empty ones in a different location. > > So I changed src/global.php as shown below. And now I can log in. >=20 > [snip] >=20 > > $cookie_params =3D session_get_cookie_params(); > > setcookie(session_name(), '', time() - 5, $cookie_params['path'], > > $cookie_params['domain']); > > setcookie('username','',time() - 5,$base_uri); > > setcookie('key','',time() - 5,$base_uri); >=20 > I cannot apply these changes. Although they seem logically correct, as > soon as I apply them, it takes two login attempts to get in, and when > signing out and returning to the login screen, I get the message you get > when the above code is not there. So it'd seem we're stuck in a slight > cross-ways. If I have the above, mine breaks, if you don't have the > above... yours breaks. Out of curiousity, what browser are you using > whilst working on this? Have you tried another version? I personally > have tried Phoenix (a mozilla, rather cut down), IE, and Galeon. I have tried this with Opera, Mozilla, Netscape and IE versions 5.5 and 6. It works fine with all of them. I can think of two things: firstly, my changes as quoted are made to the CVS source as downloaded on Friday. If you applied the change to code that you had already modified in some other way, then that could be the problem. I may not have been clear enough about the fact that I didn't make any of the changes you asked to be tested, I just made the changes listed above. Secondly, you may still have erroneous cookies floating around. --=20 Bruce I unfortunately do not know how to turn cheese into gold. |