Session Management and Sub-Domains

From: Date: Fri, 07 Jul 2000 06:57:31 +0000
Subject: Session Management and Sub-Domains
Groups: php.general 
Request: Send a blank email to php-general+get-5329@lists.php.net to get a copy of this message
I have designed a class language for a network of sites. These sites are all different and serve different purposes, and each site has its own sub-domain. One of the common elements of all of them is that any user can sign up for a membership to the network and upon authentication utilize a multitude of different services. Every time a user visits a page on the network, a session is started using session_start() and the session_id() is checked in a table in a mysql database to see if it exists. If it does, it assumes a user is authenticated. If it does not, then the visitor is supplied with a login box. This seems to work just fine when viewing pages at one sub-domain. However, if the user logs in at one sub-domain and then visits another sub-domain the session_id() value is different and therefore not found in the table, so the user is no longer authenticated. Does anyone have any ideas on how to get around this problem? I need to be able to have a user authenticated across all sub-domains. Thankz in advance. Robert http://www.swifte.net/ http://rswfire.swifte.net/ ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

« previous php.general (#5329) next »