Page 1 of 1

Cookies not accepted

PostPosted: 30. October 2006 10:58
by rob2006
When using XAMMP, php scritps which use cookies are not working.

I am being told by many "pre-written" php applications that my browser is not accepting cookies. However they are (Firefox and IE) and when I look at the same code being run over the internet they work fine.

An example is phpgedview, but also other codes are not working with cookies locally.

PostPosted: 30. October 2006 18:23
by Bantamanick
Hi Rob,

Not that it's much consolation, but I'm having the same problem here. I've posted on here a while back and not got much help apart from the obvious check your browser privacy settings... which of course is the first thing you do. Trouble is, my script works live, but not local, which is annoying as I can't test it!

I upgraded to XAMPP from an old version of PHP Triad (Apache 1.3.23). I've checked my php.ini and httpd.conf but no clues.

Will let you know if I get it solved.

Nick

PostPosted: 02. November 2006 17:54
by rob2006
See the other cookie problem thread for a solution I have found.

PostPosted: 06. November 2006 11:53
by WorldDrknss
Domain - This can be used to specify the domain name, and must contain at least two periods to be valid. If this argument is not specified, the default value is the host name of the server that created the cookie. All cookies are valid only for the host and domain that created them.

for cookies use something similar to:
Code: Select all
setcookie("Name", "Value", "Expiry", "Path", "Domain", "Security");


Example:
Code: Select all
setcookie("MemberName", $mem_user, time()+86400, "/", "", "0");


Good Luck