Page 1 of 1

Cookies

Posted: Wed Jan 08, 2003 10:48 am
by wavevader
I recently had a PHP application I had written running on a remote host successfully. I now can't get the thing running on my local machine.
The trouble lies in the setcookie() function, it just refuses to write them. I have cookies enabled on the browser (javascript writes cookies fine). Is there anything in the PHP.ini file that i should set?
Apart from this problem PHP seems to run ok.
I'm running Apache on Win XP with PHP4 and IE.
Thanks for any help.

Posted: Wed Jan 08, 2003 10:56 am
by DaiWelsh
How are you addressing the local machine (Ip address, 'localhost', machine name?). I believe the RFC requires at least two dots in the host nae for cookies and I seem to remember running into an odd problem a while back when trying to set cookies from 'localhost'? If you are addressing it as 'localhost' try using '127.0.0.1' instead and see if that makes any difference.

HTH,

Dai