Re: Problem deleting a cookie...
| From: | André Cerqueira | Date: | Mon, 23 Feb 2004 23:43:11 +0000 |
| Subject: | Re: Problem deleting a cookie... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-178608@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Here's what I use to set the cookie. $value=(time() + 9000) . ":$uid:$username:$gid:$fullname"; SetCookie("Trackookie", $value, 0, "", "server.mssystems.com" ); Here's what I use to delete the cookie. SetCookie("Trackookie", "", time()-3600, "", "support.mssystems.com");the domain is different one of them uses one domain for creating and deleting, the other uses the other domain, right? check that... Dave O wrote:
Hi all. I'm currently experiencing a problem deleting cookies on a test server. Before I go on, here's the server info: Server 1 ---------- Apache 1.3.29 PHP Version 4.3.4 Server 2 ---------- Apache 2.0.48 PHP Version 4.3.4 Previously running PHP 5.0.0.a4 I've got a technical support app running on Server 1. Well I wanted to add some features and started playing around with PHP 5 and Apache 2 on Server 2. So, I tried out some of my scripts that used the following for using cookies. Here's what I use to set the cookie. $value=(time() + 9000) . ":$uid:$username:$gid:$fullname"; SetCookie("Trackookie", $value, 0, "", "server.mssystems.com" ); Here's what I use to delete the cookie. SetCookie("Trackookie", "", time()-3600, "", "support.mssystems.com" ); Now, creating the cookie is no problem. Deleting the cookie is where I started having problems on Server 2. At first, I thought it was PHP5 so I went to PHP4. However, I still kept having the same problem. Looking at the headers using Mozilla Live-Headers I was able to see that this was sent from both servers: Set-Cookie: Trackookie=deleted; expires=Sun, 23-Feb-2003 22:47:22 GMT; domain=server.mssystems.com However, if I look at the Mozilla cookie manager, I still see the cookie there for Server 2. If I try the same thing on Server 1, the cookie gets deleted without any problems. I suspect it may be due to my using Apache 2 and downgrading won't be a problem, but I wanted to check first if anyone had been experiencing the same problems. I should add, though, that I was a little overzealous and added quite a few extensions on Server 2 in order to experiment with them. Have there been any reports of extensions causing confllicts with cookies. Thanks and I appreciate any general comments or advice about this. do -----BEGIN PGP SIGNATURE-----Version: GnuPG v1.2.4 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFAOpAPaxdA/5C8vH8RAndlAKCd3n+pH4DxylGSLpJ4bPJSc3TiUQCeP8oR G7W4tri3muQTIjPklUi8Yk0= =rBso -----END PGP SIGNATURE-----