i've written a simple script, which tests the session behaviour on the IIS,
since it didnt seem to work
the following script should increase the session-var $testVar and display it
but it always stays at the same value
can someone explain that? is that a bug?
also if i would increase $_SESSION['testVar'] it doesnt work.
i have been looking at the server and the session-file is also updated, but
not with the new values, only the timestamp is updated, it seems
session_start();
// make the session variable globally available
// we have register_globals = Off
$testVar = &$_SESSION['testVar'];
// init testVar to 1 or increase it
if( !isset($testVar) )
{
print 'set testVar to 1<br>';
$testVar = 1;
}
else
{
print 'increase<br>';
$testVar++;
}
// i can put session_register before
// or after the 'if' it always happens the same
session_register('testVar');
print $testVar;
the environment:
- IIS-Server5.0, WIN2k
- PHP4.1.2
- session.auto_start = 0
- register_globals = Off
i am using the recommended-php.ini, that's why register_globals is off
thanks for help
--
Wolfram
... translating template engine ....
http://sf.net/projects/simpletpl
... authentication system ....
http://sf.net/projects/auth
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php