开发者

setcookie fails in IE

I can't, for the life of me, figure this one out.

This site used to work fine in IE but now it refuses to set cookies. I have tested it in multiple versions on multiple computers and yet still no avail. It behaves normally in all other browsers. The source code hasn't changed, neither has any update been applied to the server.

setcookie() returns TRUE for that matter but I check and no cookie was set.

I checked the time of the server and it is accurate to the second. I have created a sample file with J开发者_如何学编程UST setcookie() and on this domain it doesn't work. All others work properly. Even tried setting the required parameters to all. I have no clue as to what could be wrong.

Version Info:

  • PHP Version 5.1.6
  • Apache/2.2.3 (CentOS)

EDIT - SAMPLE CODE

setcookie("session", "e180564a1b6533ec5b0c63e8009d0bc27a90b226", time()+3600);

EDIT 2

It appears as though the client hired another development team who destroyed the DNS, has the A record pointed to another server and is forwarding all traffic via some means to the correct one without changing the URL in the address bar.

This one may have been solved.

Any ideas?


Are you sure that cookies are enabled in Internet Explorer? This is the most common cause in my opinion.

See http://kb.iu.edu/data/ajfh.html for reference.


I've seen IE security settings cause problems with cookies as well. I've never been able to narrow it down to a specific one, but sometimes a P3P header can help - see here for more information: http://articles.sitepoint.com/article/p3p-cookies-ie6/2.


Are the domains/subdomains proper ones? IE will not set a cookie if the domain does not follow the RFC. The most common cause for this is an underscore _ in the subdomain.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜