The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End PHP Session Reply To: PHP Session


If the two domains share a common parent (that you control), then you can configure the session cookie to apply to all your subdomains:


// these are simply the default values;
// we have to include them in order to set the $domain argument
$ttl = 0;
$path = '/';

// note the leading dot (.) in the domain
$domain = "";

session_set_cookie_params( $ttl,$path,$domain );