Page 1 of 1

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

PostPosted: 23. June 2008 09:42
by Tim Dawson
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 ?

PostPosted: 23. June 2008 10:01
by Milligan

PostPosted: 23. June 2008 10:13
by sari42
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?

PostPosted: 23. June 2008 10:20
by Tim Dawson
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