Re: Re: 500 Internal Server Error
| From: | Olivier Mascia | Date: | Wed, 02 Jan 2002 09:48:25 +0000 |
| Subject: | Re: Re: 500 Internal Server Error | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-11267@lists.php.net to get a copy of this message | ||
Hello,
Chris Burwell wrote:
CB> Now i am encountering another problem. It seems session vars do not retain
CB> their values once you leave the page that registers them. I have found
CB> several entries in the bug database about this. My question is does anyone
CB> else encounter this problem, and has anyone solved this problem. Also, does
CB> anyone know if this problem is going to be addressed in future releases of
CB> PHP?
I'm new with PHP and started with 4.1 without getting used to previous
versions. I remember having read that there are numerous changes
regarding global variables and sessions variables in 4.1 compared to
previous versions. Here is how I use sessions variables and it works
flawessly for me with PHP 4.1 / ISAPI / IIS 5.0 :
session_start();
$vcu = &$_SESSION["visitcountupdated"];
..
$vcu = TRUE;
That is, I always act on sessions variables through the $_SESSION array
(I do not make use of the register() function.)
To simplify writing in my scripts I often starts as above by creating a
short-hand variable and have it reference the $_SESSION element as in
the above $vcu = &$_SESSION["visitcountupdated"];
The real session variable is "visitcountupdated", but the variable I use
and update in the script is $vcu which is a shorthand for the other one.
I do not know if that is the best way to do it, but it undoubtly works
great for me on the above configuration.
--
Olivier Mascia <om@mascia.biz>