note 60409 deleted from function.session-start by bjori
| From: | bjori@php.net | Date: | Sun, 16 Apr 2006 00:36:51 +0000 |
| Subject: | note 60409 deleted from function.session-start by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-108231@lists.php.net to get a copy of this message | ||
Note Submitter: martinlarsen at bigfoot dot com
----
Here is another way of losing session variables (not complete sessions):
I kept loosing *some* session variables controlling logins, but most of the session vars stayed
intact. After nearly going crazy, I discovered that the web host had register_globals ON.
That meant that each time I assigned a variable with the same name as a session variable, the
session variable changed too!
For example:
$_SESSION['id'] = 100;
$id = 0;
echo $_SESSION['id'];
// This prints 0, not 100!
If some of your session vars dissappear or change mysteriously, look out for register_globals = ON
!!!