Cookie Problem

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Cookie Problem

Postby ROSEBLOOD » 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.

~ROSEBLOOD
ROSEBLOOD
 
Posts: 5
Joined: 10. January 2005 02:11
Location: Fallbrook, CA

Postby Dave_L » 10. January 2005 22:04

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)?
User avatar
Dave_L
 
Posts: 212
Joined: 23. October 2004 00:43

Re: Cookie Problem

Postby taustin » 10. January 2005 22:11

Are you writing your own script, or using something someone else wrote?
taustin
 
Posts: 150
Joined: 24. September 2004 00:23
Location: Huntington Beach CA

Postby ROSEBLOOD » 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.

~ROSEBLOOD
ROSEBLOOD
 
Posts: 5
Joined: 10. January 2005 02:11
Location: Fallbrook, CA

Postby ROSEBLOOD » 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.

~Andrew
ROSEBLOOD
 
Posts: 5
Joined: 10. January 2005 02:11
Location: Fallbrook, CA

Postby Dave_L » 12. January 2005 02:17

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.
User avatar
Dave_L
 
Posts: 212
Joined: 23. October 2004 00:43


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 66 guests