Cookies

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
wavevader
Forum Newbie
Posts: 1
Joined: Wed Jan 08, 2003 10:48 am

Cookies

Post 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.
DaiWelsh
Forum Commoner
Posts: 36
Joined: Wed Jan 08, 2003 9:39 am
Location: Derbyshire, UK

Post 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
Post Reply