RE: [PHP] Strange Session Issues
| From: | Johnson, Kirk | Date: | Mon, 07 Jan 2002 16:45:03 +0000 |
| Subject: | RE: [PHP] Strange Session Issues | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-79708@lists.php.net to get a copy of this message | ||
With it off, session_register() is not needed. Also, session variables must
be accessed thru the $HTTP_SESSION_VARS[] array. Try this code:
test_session1.php
<?
session_start();
$HTTP_SESSION_VARS['blah'] = "good";
?>
test_session2.php
<?
session_start();
echo session_is_registered("blah") . "<br>";
echo session_encode(). "<br>";
echo isset($HTTP_SESSION_VARS) . "<br>";
echo sizeof($HTTP_SESSION_VARS) . "<br>";
echo $HTTP_SESSION_VARS['blah'];
?>
> -----Original Message-----
> From: Alastair [mailto:alastair@uoguelph.ca]
> Sent: Monday, January 07, 2002 9:33 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] Strange Session Issues
>
>
> I've turned it off. When I try reading a variable using
> $HTTP_SESSION_VARS["blah"] but it says that there is no index
> for 'blah'.
>
> thanks!
> alastair
> "Kirk Johnson" <kjohnson@zootweb.com> wrote in message
> news:01A4B59FD1EBD311838100A0C98BE0D9AD5EFB@chef...
> > Once again, is register_globals on or off in your php.ini
> file? It would
> > help us if we knew that :)
> >
> > Kirk
> >
> > > -----Original Message-----
> > > From: Alastair [mailto:alastair@uoguelph.ca]
> > > Sent: Monday, January 07, 2002 9:05 AM
> > > To: php-general@lists.php.net
> > > Subject: [PHP] Strange Session Issues
> > >
> > >
> > > I posted a question earlier, but I don't think I explained
> > > my problem all
> > > that well.
> > >
> > > I am having problem with sessions on my W2K box. I can start
> > > sessions and
> > > register variables but I can't, however, seem to get the
> > > contents of the
> > > registered variables written.
>
>
>
> --
> 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
>