RE: [PHP] Session Handling Changes between 4.2.3 and 4.3.1
| From: | Ford, Mike [LSS] | Date: | Tue, 15 Apr 2003 14:12:49 +0000 |
| Subject: | RE: [PHP] Session Handling Changes between 4.2.3 and 4.3.1 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-143945@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Sascha Braun [mailto:saschabraun@gmx.de]
> Sent: 16 April 2003 00:56
>
> i worked for a while with the Windows Version of PHP 4.1
> and later 4.2.
>
> After I changed my Development Environment to Linux and
> the PHP Version 4.3.1, some or all of my formerly projects
> showed some errors or are just working in a different way
> than before, due to the changes in session handling.
>
> I have read thru the session handling parts of the 4.2.3
> Docs for PHP and compared it to the way i have programmed
> the session handling in my websites. I could not really
> find any differences.
>
> I do start the sessions in an global.inc.php file with
> session_start() and after that i register them for exam-
> ple with session_register('user') for Customermanagement.
>
> After that I'm referencing the session thru
> $_SESSION['user']['username'] and so on.
If you're using the $_SESSION[]array, *don't* use session_register(),
session_is_registered(). Just start the session with session_start() and then stick to assigning to
/ referencing $_SESSION[] elements.
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