Problem deleting a cookie...
| From: | Dave O | Date: | Mon, 23 Feb 2004 22:58:31 +0000 |
| Subject: | Problem deleting a cookie... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-178604@lists.php.net to get a copy of this message | ||
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