Re: PHP 4.0.4pl1 and $HTTP_SESSION_VARS
- From: Captain Paralytic <paul_lautman@xxxxxxxxx>
- Date: Wed, 16 Sep 2009 16:09:30 -0700 (PDT)
On 16 Sep, 22:53, donb <donbe...@xxxxxxxxx> wrote:
Oops, I had originally posted this inquiry with the wrong info in the
subject line...
--------------------------------------------------------------------------- ----------------------------------------
Bleah. I have no recourse but to do something on aa archaic
server...
I want to set a session variable and have it 'live' through the
session lifetime. I do this:
<?php
session_start();
$HTTP_SESSION_VARS['FRED'] = "ETHYL";
var_dump($HTTP_SESSION_VARS);
?>
and 'FRED' is var_dumped.
I comment out the assignment statement and reload the page, the
var_dump has zero elements.
I've never touched a version of PHP so old so I'm clueless why this
is. I understand the 'superglobal' difference, and that
$HTTP_SESSION_VARS isn't 'super' like $_SESSION.
I tried adding session_register('FRED') but still no joy.
How the heck to session variables work on 4.0.4pl1? I'm starting to
think they don't! It looks like $HTTP_SESSION_VARS is behaving as an
ordinary variable - like I'm not setting anything in the session at
all.
I did check session_id() when repeating the above code, and the
session ids are the same both times, so clearly I am creating and
using a single session.
I know I'm baffled. I may also be stupid. Am I doing something
stupidly wrong?
Can't say I've used one that old either but have you tried:
<?php
global $HTTP_SESSION_VARS;
session_start();
$HTTP_SESSION_VARS['FRED'] = "ETHYL";
var_dump($HTTP_SESSION_VARS);
?>
.
- Follow-Ups:
- Re: PHP 4.0.4pl1 and $HTTP_SESSION_VARS
- From: donb
- Re: PHP 4.0.4pl1 and $HTTP_SESSION_VARS
- From: donb
- Re: PHP 4.0.4pl1 and $HTTP_SESSION_VARS
- References:
- PHP 4.0.4pl1 and $HTTP_SESSION_VARS
- From: donb
- PHP 4.0.4pl1 and $HTTP_SESSION_VARS
- Prev by Date: Re: Varying Responses to Opening URL
- Next by Date: Re: PHP 4.0.4pl1 and $HTTP_SESSION_VARS
- Previous by thread: PHP 4.0.4pl1 and $HTTP_SESSION_VARS
- Next by thread: Re: PHP 4.0.4pl1 and $HTTP_SESSION_VARS
- Index(es):
Relevant Pages
|