Anybody aware of cookies problems with explorer 3/4.x/5.
Trying to write an authentication system and explorer does weird things.
I used every parameter to set cookies in explorer.
I check for the cookie's value when the page begins but it doesn't work in explorer. Works in Netscape 4.72 and other flavors.
Daron
Did you check to see if Explorer was set to allow cookies?
I use cookies in my authentication systems and it works perfectly with NS4+ and IE4+ so if your browser is set up properly then it must be something other than the browser.
the problem is that for some reason the time () function doesn't work the way it should under windows nt/98. what you should do is just hardcode the amount of time the cookie should last. example: setcookie($oreo,$id,2800)
let me know if this works.
BigVic! "" @@ \/
The time() function doesn't work? What are you talking about, no offence here, but I use the time() function with my cookies and I use WinNT, Win98, and Win2K and it seems to be working great for me.
I just tested it, and it still works 🙂
whatever, just give it a try daron.
Here's the real problem.
In explorer, it allows access to member pages without logging in(pages check for authentication cookie).
Here's the code.
if($HTTP_COOKIE_VARS["upx1"]!=$codehash) header("Location: http://www.autobahamas.com/login.htm"); else $emailact = $HTTP_COOKIE_VARS["email"];
// Display member stuff.
Vic,
It Works, Egad It Works! I hard coded it just like you said and bingo... the rest is history.
Thanks man!
glad to be of help.
"" @@ \/
I think it throws netscape off. I may have to check for the browser and design for each.
I tested php cookie's with Netscape 4 and 6 and Internet Explorer 4 ,5 and 5.5 and it works just fine. Any problem must eather be in the individual scripts or the client softwares configuration.
Do you have one script to service all browser?
Do you provide code for each browser?
I've tested my code with all those browsers and the same code functions perfectly on all of them, with the one exception of if a client is behind a nasty firewall that blocks cookies, but their ain't much you can do about that.
I took the date field out of my cookies as well (a user authentication set) and they worked perfectly in ie and ns.
Now I've just got to figure out the rest of the bloody templating (a large news site, for a Gannett Newspaper).
Again, the expiry reason was the solution.