Do I need to enable something to set cookies in localhost ?

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

Do I need to enable something to set cookies in localhost ?

Postby Tim Dawson » 23. June 2008 09:42

I've been running XAMPP for almost two years now, with no problems.

I'm now developing a site which requires cookies (I'm a newbie to cookies, but not to PHP). Localhost doesn't seem to set my cookies, but they are set if I upload the pages to my ISP's server and open them from there.

Do I need to set something in XAMPP to enable cookies to be set locally ?
ramasaig
Isle of Mull, Scotland

OS=WinXP Home SP2
Tim Dawson
 
Posts: 27
Joined: 26. January 2007 13:34
Location: Fionnphort, Isle of Mull

Postby Milligan » 23. June 2008 10:01

Last edited by Milligan on 17. July 2008 04:55, edited 4 times in total.
Milligan
 
Posts: 136
Joined: 03. March 2008 06:23

Postby sari42 » 23. June 2008 10:13

no need to edit php.ini (regarding cookie settings, which was the suggestion in the previous post)
maybe some firewall or vista settings do block it?
Last edited by sari42 on 26. June 2008 20:15, edited 1 time in total.
sari42
 
Posts: 800
Joined: 27. November 2005 18:28

Postby Tim Dawson » 23. June 2008 10:20

Thank you both. I'll look at the php.ini approach.

I think that if it were a firewall or OS (XP) issue I'd not get cookies posted when opening other pages from the web ? But I'll check just in case I've set up a block on localhost. Seems unlikely, though.

Later: I think I've got it working now, subject to a bit more testing. Thank you.

Turned out the problem lay in PHP GLOBALS. I think my ISP must have Globals ON, whereas XAMPP requires me to use SUPER_GLOBALS
ramasaig
Isle of Mull, Scotland

OS=WinXP Home SP2
Tim Dawson
 
Posts: 27
Joined: 26. January 2007 13:34
Location: Fionnphort, Isle of Mull


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 57 guests