steviez Posted December 22, 2009 Share Posted December 22, 2009 Hi, I have a strange one here for you (well its strange to me). When I am setting cookies in my script they work 100% fine for me in firefox but any other browser (ie, chrome etc) they simply wont register for me. My code: <?php setcookie("TestCookie", $value, time()+3600); ?> Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/185952-cookie-help-strange-one/ Share on other sites More sharing options...
shlumph Posted December 22, 2009 Share Posted December 22, 2009 You've probably already checked, but check again to make sure that cookies enabled in your other browsers Quote Link to comment https://forums.phpfreaks.com/topic/185952-cookie-help-strange-one/#findComment-982011 Share on other sites More sharing options...
Lamez Posted December 22, 2009 Share Posted December 22, 2009 I have the same problem. Quote Link to comment https://forums.phpfreaks.com/topic/185952-cookie-help-strange-one/#findComment-982032 Share on other sites More sharing options...
steviez Posted December 22, 2009 Author Share Posted December 22, 2009 cookies are enables because if I set the expire time to 0 instead of say time()+3600 then it works like a charm. Quote Link to comment https://forums.phpfreaks.com/topic/185952-cookie-help-strange-one/#findComment-982338 Share on other sites More sharing options...
megaresp Posted December 22, 2009 Share Posted December 22, 2009 cookies are enables because if I set the expire time to 0 instead of say time()+3600 then it works like a charm. Perhaps the browser is set to only accept session cookies? These are cookies that expire when the session (e.g. tab or browser) is closed. And an expire time of zero is how a session cookie is set. Security software (e.g. Zone Alarm) can also be set to munch cookies. If you're using security software, make sure that's not configured to munch cookies. I once had a problem with Internet Explorer 6, where it was fine if I was setting one cookie but couldn't deal with two differently named cookies set by the same page. I doubt any modern browser is as hopeless as IE6 was, but perhaps its worth testing if you get desperate. Quote Link to comment https://forums.phpfreaks.com/topic/185952-cookie-help-strange-one/#findComment-982347 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.