Re: sessions failing to persist

From: Date: Mon, 03 May 2004 20:01:06 +0000
Subject: Re: sessions failing to persist
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-185245@lists.php.net to get a copy of this message
On Mon, May 03, 2004 at 02:49:17PM -0400, John W. Holmes wrote: > From: "Michael R. Wayne" <phpuser@wayne47.com> > > > Log shows: "GET > /g/xxx.php?PHPSESSID=52a504d36a834ea747793d3fb61908ca&field=foo HTTP/1.1" > > Browser shows: > > # Note on the following line that the sessionID was not preserved > > Stage:0 SessionID: 06d6ff28592b54f42dfb7cef6a56780e > > Can you verify what your session.name setting is in php.ini? It should be > "PHPSESSID". Yes, it is: ; Name of the session (used as cookie name). session.name = PHPSESSID > I know you're using auto-start sessions, but could you try > > session_start($_REQUEST['PHPSESSID']); Sure. I get: Notice: Undefined index: PHPSESSID in /var/www/htdocs/g/xxx.php on line 2 Notice: A session had already been started - ignoring session_start() in /var/www/htdocs/g/xxx.php on line 2 Just because, I pulled the autosession=1 out and got: Notice: Undefined index: PHPSESSID in /var/www/htdocs/g/xxx.php on line 2 the first time. The second time I do not get the error but the session id still is out of sync: Stage:0 SessionID: ee70a2de334ec0840f88d0abd658e866 ___ Submit Stage:1 SessionID: ee70a2de334ec0840f88d0abd658e866 Request: Array ( [PHPSESSID] => c0efea07fe30ec59bdfbf3930f7ee835 [field] => foo ) > at the beginning of the page? It's very odd (as you already know) that > you'll request xxx.php?PHPSESSID=abcd and get "defg" for the session_id() on > the page. The session isn't realizing that you're passing an id value. Even > when it "seems" to persist, session_id() returns "defg" while the $_REQUEST > array still shows "abcd"... very odd. Agreed. Almsot as though sessions are only half implemented. /\/\ \/\/

« previous php.general (#185245) next »