note 73257 deleted from function.session-start by nlopess

From: Date: Thu, 15 Feb 2007 13:18:44 +0000
Subject: note 73257 deleted from function.session-start by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-123429@lists.php.net to get a copy of this message
Note Submitter: kamil at ultrahost dot pl ---- SESION LOST WHEN OPEN SUBDOMAIN If you have problem with sesions and subdomains, for example you have started sesion on http://hellfun.net/ and your sesion doesnt work on http://something.hellfun.net/ There is a solution: on main domain eg. hellfun.net: <?php session_start(); $sesja = session_id(); setcookie('sesja', "$sesja", time()+25920000, '/', '.hellfun.net'); ?> and on subdomain eg. something.hellfun.net <?php session_id($sesja); session_start(); ?> Is very usefull for sites like above, because them use only subdomains.

« previous php.notes (#123429) next »