RE: [PHP] Re: sessions work using SSL for 4.0.3pl1 ?
| From: | Ford, Mike [LSS] | Date: | Thu, 24 Apr 2003 14:17:33 +0000 |
| Subject: | RE: [PHP] Re: sessions work using SSL for 4.0.3pl1 ? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-145173@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: neko [mailto:neko@swirve.com]
> Sent: 23 April 2003 11:32
>
> latest issue - if we use
>
> $HTTP_SESSION_VARS["scott"] = "things that make you go hrm";
>
> this is NOT remembered between requests. If I add this and
> then print_r the
> array, then I can see the value, but if I print_r the array
> before I add it
> in (again), then it doesn't exist, suggesting that the array
> is not being
> preserved between sessions. Any tips? Will check php.ini,
> when I can find
> the file on the server! :)
$HTTP_SESSION_VARS[] is not a "magic" array in the same way as $_SESSION[]
is. If you use $HTTP_SESSION_VARS[] (or global variables if using the
disrecommended register_globals On setting), you must still use
session_register() to add an entry to the session. Alternatively, in
versions that support it, use *only* $_SESSION[]. Any other combination is
likely to be buggy, confusing, or both!!
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211