php-general | 2000071

[PHP] Session Management and Sub-Domains From: \[ rswfire \] (rswfire <email protected>)
Date: 07/07/00

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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe <email protected>
For additional commands, e-mail: php-general-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>