#45258 [Opn->Bgs]: session cookie doesn't work across domains while other cookies do

From: Date: Fri, 13 Jun 2008 12:57:20 +0000
Subject: #45258 [Opn->Bgs]: session cookie doesn't work across domains while other cookies do
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-125742@lists.php.net to get a copy of this message
ID: 45258 User updated by: marek dot j at bia dot pl Reported By: marek dot j at bia dot pl -Status: Open +Status: Bogus Bug Type: Session related PHP Version: 5.2.6 New Comment: you should always remember to close and open your browser before sending any bug reports ;) Previous Comments: ------------------------------------------------------------------------ [2008-06-13 12:42:13] marek dot j at bia dot pl Description: ------------ I want to use session across base domain and some subdomains. Cookies set manually work fine, because when I use: setcookie('test', '123456', 0, '/', '.domain.com'); I get proper value of $_COOKIE['test'] in base domain and across all subdomains (no matter if set this cookie in base or sub domain). But when I use: session_set_cookie_params(0, '/', '.domain.com'); session_start(); $_COOKIE['PHPSESSID'] has different value for base domain and another value for all subdomains (one value for all subdomains) I think it's some bug in session_start() function, because setcookie() works fine and session_get_cookie_params() returns expected results (domain = '.domain.com'). ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45258&edit=1

« previous php.bugs (#125742) next »