Nothing is more hair-pulling than working IE6 and creating workarounds. Every E29 product has a session workaround specifically for IE6 that I thought was unsolvable, until now.
If you’re having trouble with IE6 accepting login cookies, or any cookies, using PHP, you definitely want to read on for the off the wall answer to your problem.
With the Great Daylight Savings Change of 2007, I had the wonderful experience of having applications and servers go down because of timezone issues. Oracle DB 10.2g was especially prone to this issue, and it caused a huge problem with data consistency until I devised a solution. ( Which was at the time, tell the server it was in Hawaii ).
After that mess, I started working more with timestamps and accuracy as per GMT + DST, server times versus local times in regards to timeouts, and so on. One bug that has plagued me for years is the IE6 cookie login issue.
To summarize, a client machine with Firefox and IE7 will be able to login and accept cookies from a site, but IE6 won’t. I had tried everything, including URL session ids, adding a P3P policy to the website headers, everything.
What I didn’t try, and was very noobish of me, was to calculate the expiration times of the cookie sessions in relation to the browser. What I found was pure hilarity, and caused me to want to sue Microsoft for lost productivity.
In short, and well documented on the intarwebs, is that IE6 follows the RFC for cookie expirations, and doesn’t convert them into UTC time. Instead they use the machine time against the local time, meaning timezone differences completely blow your cookies up.
IE7 thankfully corrects this, and Firefox never had the problem.
In my case, I was mostly being bitten by not correctly handling timezone differences and DST. But, in a few cases, just like the link above, the server time turned out to be wildly off and was causing IE6 to expire any cookies immediately.
The fix documented above for a timezone issue is to sync your server with NTP using the following commands:
$ ntpupdate pool.ntp.org
$ tzselect
This will sync up your server, and then allow you to set up the correct timezone.
I hope this post helps any other PHPer, or any coder, if they are having the same issues.

Subscribe to TehDevs!
cool article i will shure re read it next time i write a user required website ,
mean time i have something to point out it appears you have 3 unneeded CSS lines:
you allready have:
style.css (line 108)
img {
border:medium none;
}
so no need to do that:
style.css (line 93)
a:link img {
border:medium none;
}
sorry for peeping your code guys i was just looking into how you preview images…
found out you using thikbox - jquery rocks!
cheers!
leon on 12.20.07[…] Adam Kinder wrote an interesting post today on PHP, Cookies, and Internet Explorer 6Here’s a quick excerptNothing is more hair-pulling than working IE6 and creating workarounds. Every E29 product has a session workaround specifically for IE6 that I thought was unsolvable, until now. If you’re having trouble with IE6 accepting login cookies, … […]
Internet Explorer 6 » PHP, Cookies, and Internet Explorer 6 on 12.24.07[…] Adam Kinder wrote an interesting post today on PHP, Cookies, and Internet Explorer 6Here’s a quick excerptNothing is more hair-pulling than working IE6 and creating workarounds. Every E29 product has a session workaround specifically for IE6 that I thought was unsolvable, until now. If you’re having trouble with IE6 accepting login cookies, … […]
Internet Explorer » PHP, Cookies, and Internet Explorer 6 on 12.26.07I accidentally changed the system time (1 month backwards) on my XP / apache / PHP website PC. I had the issue with IE6 sessions not retaining user info with server side cookies (while IE7 still worked).
Greg Ambrose on 01.08.08So IE6 automatically treated the cookies as expired. Thanks a lot for the article - All I had to do was reset my system time. You save me from some major code rewriting!!!
Glad we could be of service
I know I spent a few hours banging my head off my desk until I found the solution
Adam Kinder on 01.08.08you saved my day!
thanks!
Jody on 03.10.08