Re: Sessions not remembered through pages

From: Date: Fri, 06 Oct 2000 15:05:35 +0000
Subject: Re: Sessions not remembered through pages
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-18902@lists.php.net to get a copy of this message
Hi Sascha! On Fri, 06 Oct 2000, Sascha Schumann wrote: > On Fri, 6 Oct 2000, Boget, Chris wrote: > > > > > Is there anything I need to do in my code to tell PHP to > > > > send through the SID automatically? > > > The URL rewriter only kicks in, if the session was started. > > > So, either you call session_start() in a prepended script > > > (auto_prepend_file) or start sessions automatically > > > (session.auto_start). > > > > I do have this. My (abbreviated) code looks like this: > > > > <? > > > > session_start(); > > // do stuff here > > header( "location: ./new_page.php3" ); why not: include './new_page.php3'; ? > > exit(); > > also, the headers will look like: HTTP/1.0 200 OK Location: ./new_page.php3 Set-Cookie: SESSIONID=dd if=/dev/urandom bs=1 count=32 |uuencode -m - ; etc. [joke] Connection: close *or something* from my experience w/ session+location, having a location header *before* the cookie header makes some browser (lest NS) ignore the Cookie header. YMMV though. -- teodor

« previous php.general (#18902) next »