Page 1 of 1

Cookie Problem

PostPosted: 10. January 2005 06:19
im running the latest version of XAMPP and i am having trouble with the 'setcookie' function in PHP. I know its not the browser because i can accept cookie from other sites (including this one) and i have tried it in FireFox and IE. I was wondering if there are any known bugs with this or not. or if someone knows a way to fix it.


PostPosted: 10. January 2005 22:04
by Dave_L
I haven't seen any problem with that in XAMPP 1.4.9, which I'm using. Do you have experience with using PHP's setcookie() function (on other platforms)?

Re: Cookie Problem

PostPosted: 10. January 2005 22:11
by taustin
Are you writing your own script, or using something someone else wrote?

PostPosted: 11. January 2005 17:11
Im writing my own script, im running it on a localhost server. some others have told me that the way im setting the cookie is wrong. I'm using $_SERVER['SERVERNAME'] or something like that, i dont remember im not looking at my code at the moment. They have told me to change the domain to an empty string. I'll will try that and post back if it works or not.


PostPosted: 12. January 2005 02:10
IT WORKS...I never thought about making the domain an empty string. But luckly i found out i should do that and it works great now. Thanks for all your help guys.


PostPosted: 12. January 2005 02:17
by Dave_L
If the domain is an empty string, that's interpreted as the domain in the HTTP request. You can specify the domain, but you have to do it with exactly the right syntax.