So I have a PHP function that sets a session variable as follows:
function createSVar($varext) {
[...]
$_SESSION['v'.$varext) = time(); // hypothetical value set
[...]
return $output;
}
And functions that call it:
function someFunction1() {
[...]
$output = createSVar("name1");
[...]
return $output;
}
function someFunction2() {
[...]
$output = createSVar("name2");
[...]
return $output;
}
These function is contained in a functions file. Then I have a config file setup as follows:
<?
ob_start();
session_name("mysession");
session_start();
[...]
include("functions.php");
Then on my PHP pages these are used as follows:
<?
include("config.php");
[...]
echo someFunction2();
[...]
echo someFunction1();
My problem is that this setup works fine on two different machines with PHP 5.2.17. On the third one with PHP 5.3.0, it doesn't. For some reason, it changes the previous session values (for the previously set session variable) on each call of the createSVar()
function. I checked the changelog and didn't see any updates.
Could this be a bug?