note 54548 deleted from function.setcookie by bjori

From: Date: Mon, 08 Jan 2007 10:47:07 +0000
Subject: note 54548 deleted from function.setcookie by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-121427@lists.php.net to get a copy of this message
Note Submitter: p dot nowicki at hero dot mac dot edu dot pl ---- It takes me some time to solve a problem with PHPSESSID propagation in URL's when --enable-trans-sid is on. The problem was that even when user has cookies turned on, sometimes PHPSESSID has been shown in URL. I used subdomains on my page to make the URL's more user-friendly. It turn out that the session cookie was automaticly set to main domain address with "www" (ex. "www.domain.top_domain"), when session.cookie_domain was set to (default value) "no value". Adding <?php ini_set("session.cookie_domain", ".domain.top_domain"); ?> helped, and now when session cookie is set, all URL's are clear from the nasty session id. Right now it seems to be pretty logical, but sometimes you can easly forget about something like that.

« previous php.notes (#121427) next »