Re: SSL & normal sessions stored differently?

From: Date: Thu, 03 Nov 2005 17:56:48 +0000
Subject: Re: SSL & normal sessions stored differently?
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-225063@lists.php.net to get a copy of this message
Jesse Guardiani <jesse <at> wingnet.net> writes: > > James Benson <jb <at> jamesbenson.co.uk> writes: > > > > > Could it be you have two differnt domain names, PHP could be using a > > different cookie/session for each one. > > Yeah, but I'm setting the session_id manually. I've checked my session > storage path and only one file is created with that session id. Wouldn't > force feeding PHP the session id override any domain problems anyway? > > I think the problem is that I have session.auto_start turned on. I can't > turn it off for fear of breaking a production site. > > Is there any way to feed PHP a session id with auto_start ON? Here's a solution I found: I'm just passing the session_id via GET to the secure site, then doing this on the index page: session_write_close(); if (isset($_GET['PHPSESSID'])) { session_id($_GET['PHPSESSID']); } session_start(); I had tried that yesterday, but it didn't work. The trick in this case (since auto_start is ON) is to call 'session_write_close();' before setting the session_id. Nothing magic about it after all. :) Thanks for the help! -- Jesse Guardiani jesse@wingnet.net

« previous php.general (#225063) next »