Internet Explorer ignoring PHP setcookie() from CentOS server
Posted
by
Hussein Sabbagh
on Server Fault
See other posts from Server Fault
or by Hussein Sabbagh
Published on 2013-10-18T16:46:12Z
Indexed on
2013/10/19
21:58 UTC
Read the original article
Hit count: 251
In the past we used a windows XAMPP server for an internal website. It worked fine but had some intermittent issues and we decided to move to a LAMP server on CentOS.
We made the switch today but it turns out Internet Explorer ignores every attempt I make at saving a cookie. There is no underscore in the URL being used... the URL is actually the same as the one the XAMPP server used, where I was able to save cookies without any problems.
It really doesn't make any sense to me, all of the code is the same. The only thing to change is the version of PHP and the server OS. The website works on all other browsers except IE.
I can't even make a simple setcookie call. On a blank test page I use setcookie("test", "test", time()+36000, "/"); sleep(5); print_r($_COOKIE); and there is nothing there. Our users can't log into the website because of this and I have no idea what the issue is. If anyone can provide any clues or resolutions I would greatly appreciate it.
Obviously the easy answer is to not use IE, but that is not an option in this case.
© Server Fault or respective owner