IE 6 Cookie Bug

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Etherguy
Forum Commoner
Posts: 70
Joined: Fri Nov 01, 2002 9:09 pm
Location: Long Island, New York

IE 6 Cookie Bug

Post by Etherguy »

Seem to be having problems with cookies on ie 6 connecting to an intranet site :cry:

The code works fine in firefox , but won't set the cookies on ie6.

Now for a twist, if I move the code to a public (internet accessible) site. It would appear to work fine on IE6.

Any suggestions or solutions?
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

I have no clue. All I can say is...

I hate IE. Tell the entire company to stop using IE. It's a total waste of hard drive space. :wink:



:D
rehfeld
Forum Regular
Posts: 741
Joined: Mon Oct 18, 2004 8:14 pm

Post by rehfeld »

first thing is check your IE security settings. If its an intranet,
you need to set it to whatever the highest setting people in the company will be using(which may make this prob worse lol)

make sure that the path and domain parameter of the cookie you are sending is for the same domain

if you send a cookie for
example.org
it may not work on
intranet.example.org
or even
http://www.example.org

if you specify
.example.org
(notices the leading .) it should work

another thing you may need to try is sending a p3p header along w/ the cookie
its not really the way the problem should be solved, but it usually works if the above is not the problem

Code: Select all

header('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"');
check the headers that the server is sending on your dev box, and then the headers from the web accessible server(where ie is behaving)
compare them
User avatar
Etherguy
Forum Commoner
Posts: 70
Joined: Fri Nov 01, 2002 9:09 pm
Location: Long Island, New York

SOLVED

Post by Etherguy »

Well it would appear that IE 6 is a real stickler for having the correct time on the server.

I found that the timezone was wrong on the server which made the time difference more then the hour I was allowing for the cookie.

Firefox would appear to be more intelligent in handling the cookies since it was adding an hour from the time the cookie was set locally, not on the server.

Chalk another one up to firefox :D

Thanks for the suggestions though.
Post Reply