RE: [PHP4BETA] regarding session_register...
| From: | Giancarlo Bonansea | Date: | Fri, 10 Dec 1999 17:56:12 +0000 |
| Subject: | RE: [PHP4BETA] regarding session_register... | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-7772@lists.php.net to get a copy of this message | ||
I always used the session_start() function on a auto_prepend .inc file, but
looking at these messages, I tried to use the session.auto_start config
variable thus removing the session_start() from my prepend_files. Now, each
page acessed generates a new session, instead of using the first one
created. I think the behavior should not be this way...
Is there something wrong here? I'm using output buffering.
I have compiled the latest CVS, about half an hour ago.
Giancarlo Bonansea
Technology Consultant
TESEtec Tecnologia e Solucoes Educacionais Ltda.
Sao Paulo - SP - Brazil
TEL +55-11-5182-2155 R.204
FAX +55-11-5182-9823
-----Original Message-----
From: David Sheckler [mailto:david.sheckler@dat.com]
Sent: Friday, December 10, 1999 3:30 PM
To: php4beta@lists.php.net
Subject: Re: [PHP4BETA] regarding session_register...
Are you calling session_start(); and session_register("var"); before any
http tags? If you're not, it won't work. They must be the first thing
the
browser receives (before and http tags/web page/java script etc...).
Correct me if I'm wrong.
-Dave Sheckler
Hans Rakers wrote:
>
> On Fri, 10 Dec 1999, you wrote:
> > On Fri, 10 Dec 1999, Hans Rakers wrote:
> > >
> > > Hello all,
> > >
> > > Is it normal behaviour that session_register has to be called across
various
> > > script files to retreive a value from a session? In other words, is it
normal
> > > that after calling session_register in a script, i have to call it
again in the
> > > next script to retreive the value of the registered variable again?
> > >
> > > Any help would be greatly appreciated.
> >
> > No, the normal way to start a session is to call session_start() or set
> > session.auto_start = 1 in the config file. session_register() has a side
> > effect of starting a session if it's not started already so that's why
> > it works.
> >
> > -Andrei
> > * We reason deeply, when we forcibly feel. *
>
> Hi,
>
> Thanks for such a quick answer :)
> Anyway, before calling session_register i *do* call session_start.
> The first scriptfile (where i start the session) contains this:
>
> session_start();
> session_name($authrow[authorName]);
> session_register("tekoopUID");
> $tekoopUID=$authrow[authorID];
>
> Now somewhere else in the website i want to pull out the value for
'tekoopUID'
> from the session, but $tekoopUID contains nothing. It does return the
> original value after calling session_register("tekoopUID") again. Or do i
have
> to use session_start() again (instead of session_register) at this point
to be
> able to retreive the registered variables in the session ?
>
> BTW: Is this mailinglist archived on the web somewhere?
>
> Thanks again,
>
> Hans Rakers
>
> --
> PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
> For additional commands, e-mail: php4beta-help@lists.php.net
> To contact the list administrators, e-mail: php4beta-admin@lists.php.net
--
PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
For additional commands, e-mail: php4beta-help@lists.php.net
To contact the list administrators, e-mail: php4beta-admin@lists.php.net