November 28, 200718 yr comment_5979 Hi All,I am having some major problems using cookies. Whilst developing the site on localhost I had no problems.I have configured my firewall to forward http traffic from a public IP to my machine and cookies just will not work.I have created a simple test page which consist of this: <?php $value = 'something from somewhere'; setcookie("TestCookie", $value, time() + 3600); // Print an individual cookie echo $_COOKIE["TestCookie"] . "<br>"; echo $HTTP_COOKIE_VARS["TestCookie"] . "<br>"; // Another way to debug/test is to view all cookies echo "<pre>"; print_r($_COOKIE); echo "</pre>"; ?> But no cookie is created.Can anybody tell me why? Is it related to my firewall? Report
November 28, 200718 yr comment_5980 IE somethings block junk cookies too so it might be that... Best Regards Olajide Olaolorun The Uniform Server Development Team Report
November 29, 200718 yr Author comment_5984 Nah its not that. It's doing this in Firefox as well.I have been monitoring the HTTP headers sent to/from the server and I can see the request to create a cookie and the client is sending it back in the header.I have just noticed however that there is something funny in $_SERVER.When accessed through localhost it looks like this ["HTTP_COOKIE"]=> string(15) "test=test+value"When accessed from the Internet i get this ["HTTP_XOOKIE"]=> string(15) "test=test+value" What is XOOKIE and why is the data sent there? Report
November 29, 200718 yr Author comment_5988 I have solved the problem.Our firewall uses something called Protection Profiles (its a FortiGate) that was deforming the cookie part of the packet.I removed the option to block cookies and everything is A-OK. Report
November 30, 200718 yr comment_6003 lol, that was my next troubleshooting idea. Best Regards Olajide Olaolorun The Uniform Server Development Team Report
December 3, 200718 yr comment_6018 lol Best Regards Olajide Olaolorun The Uniform Server Development Team Report
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.