Jump to content

Cookie help **Strange One**


steviez

Recommended Posts

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?

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.