Can't set a cookie in Chrome 5

Posted by Nicolas on Stack Overflow See other posts from Stack Overflow or by Nicolas
Published on 2010-05-27T10:29:19Z Indexed on 2010/05/27 10:31 UTC
Read the original article Hit count: 395

Filed under:
|
|
|
|

Hi,
Since today I am facing a tricky issue with Google Chrome that I've just updated to v5.
I have a user login process running on my website. Everything works fine on FF 3.6.x and IE 7, but I just can't set any cookie in Google Chrome 5. I'm mentioning 5 because it worked very well before on v4.

My PHP script looks like that:

  $cook = setcookie($cookieName, $value, $expires, '/', '.'.$domain);
  var_dump($cook, isset($_COOKIE[$cookieName]));

I even tried the alternative setrawcookie without any result.

  $cook = setrawcookie($cookieName, $value, $expires, '/', '.'.$domain);
  var_dump($cook, isset($_COOKIE[$cookieName]));

FF 3.6.x and IE7 output:

bool(true) bool(true)

Whereas Chrome v5 outputs:

bool(true) bool(false)



And obviously I see not trace of this cookie in Google Chrome 5. Any idea? =/

Cheers,
Nicolas.

© Stack Overflow or respective owner

Related posts about php

Related posts about cookies