Re: Sessions and SSL

From: Date: Thu, 08 Feb 2001 01:56:44 +0000
Subject: Re: Sessions and SSL
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-38656@lists.php.net to get a copy of this message
There are two ways of doing sessions, only two cookies and ugly urls. it doesnt matter if your crossing 8 domain names, or sticking to one, there are only two options. Are these domain names on the same server? yes? great then we can work with this. you'll have to either disable cookies (cookies work per domainname) or write some code to handel forcing the PHPSESSID.... <?php include_once('time.egn'); if ( isset($HTTP_GET_VARS['PHPSESSID']) ) session_id($HTTP_GET_VARS['PHPSESSID']); if ( isset($HTTP_POST_VARS['PHPSESSID']) ) session_id($HTTP_POST_VARS['PHPSESSID']); session_start(); if (!isset($HTTP_SESSION_VARS['SessionID'])) { $SessionID = mtime(); session_register('SessionID'); } if (!isset($PHPSESSID)) $PHPSESSID = session_id(); $SID = "PHPSESSID=$PHPSESSID"; ?> now when you wan to force the SESSIONID across domains go like this. <? echo " <a href='http://www.mediawaveonline.com/index.php?$SID'>Mediawaveonline.com</a> "; ?> now as long as the domainname is on the same server, this will work. -- Chris Lee Mediawaveonline.com lee@mediawaveonline.com "Jeffrey A Schoolcraft" <dream@dr3amscap3.com> wrote in message news:20010207203105.I16742@chimera... > I'm wondering if it's possible to somehow transfer session data across apache > virtual hosts. Or if it's needed. I'd like to have a site that can pass > certain session data from http: to https: Is this possible? > I'd like to do > this without cookies or ugly urls. I compiled php4.0.4 with transid (or > whatever made transparent session data). > > Thanks. > > Jeffrey Schoolcraft > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#38656) next »