Re: cookies are lost

From: Date: Fri, 20 Oct 2000 08:18:43 +0000
Subject: Re: cookies are lost
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-21350@lists.php.net to get a copy of this message
Hi Eric! On Thu, 19 Oct 2000, Eric Wood wrote: > Someone the other day was complaining about losing their cookies when going > from page to page. For me, I get a cookie on a unsecure page and I get > re-issued another cookie when jumping to a secure page - even though my > cookie name is the same. > > I'm running RH 7.0, apache 1.3.12, php 4.0.1. > > It seems Internet Explorer 5.5, and Netscape 4.7 is storing the cookies for > different connections, port 80 vs. port 443. I can verify this because the > same cookie display different values on the two pages. yes, that's the reason the `secure' parameter exists for the setCookie(). otherview I guess you are using some header('Location:...') there, which I had fun some time ago. Remember to have the cookie header *after* the location header because they are sent in reverve order (namely LIFO policy) and you must sent the cookie header first in order not to be ignored. -- teodor

« previous php.general (#21350) next »