Page 1 of 1

Session problem with Windows 8.1

PostPosted: 30. October 2013 09:59
by DeVrije
My laptop running with XAMPP 1.8.1 on Windows 8.0 the following code does work fine:
Code: Select all
<?php
session_start();
echo '<br />'.session_id().'<br />';
if (!isset($_SESSION['Counter'])) $_SESSION['Counter'] = 0;
++$_SESSION['Counter'];
print_r($_SESSION);
?>

with the following proper results after running 'localhost/xxx.php' 3 times:
2nifn2kse2ggefvs72b1vboim2
Array ( [Counter] => 1 )
2nifn2kse2ggefvs72b1vboim2
Array ( [Counter] => 2 )
2nifn2kse2ggefvs72b1vboim2
Array ( [Counter] => 3 )

After upgrading to XAMPP 1.8.2 -and- Windows 8.1 I got the following WRONG results:
kmehhb27uvetantjke43u0coe5
Array ( [Counter] => 1 )
e7n56u5c1ngougb0rae87m8r21
Array ( [Counter] => 1 )
s2rti3ojvscck3qj4dej73plp2
Array ( [Counter] => 1 )

You can see, that session_id is still different for the same user which MUST be the same!

I do still not know where the bug should be: in XAMPP 1.8.2 -or- in Windows 8.1?

What should I have to do to solve that problem?

Re: Session problem with Windows 8.1

PostPosted: 30. October 2013 12:44
by Altrea
Running XAMPP 1.8.2-2 on Windows 7 Enterprise here and the script is working as expected.
Best guess: Browser (Cookie) Security / Settings

Re: Session problem with Windows 8.1

PostPosted: 30. October 2013 21:25
by DeVrije
It means that that big important problem should be caused by a fault of Windows 8.1, right?
What should we do to tell Microsoft about that problem, so that it can be solved by them as soon as possible?

I used the same cookies, security and settings as the one at Windows 7 -and- 8.0 where that problem does not occur!

Re: Session problem with Windows 8.1

PostPosted: 30. October 2013 21:30
by Altrea
No, i am guessing that it is a browser (setting) problem (e.g. privacy modes which don't set any cookies which are needed for identifying the browser to assign the session to the request)
First thing you could try is choosing an alternative browser and test of the problem occurs there too.

Re: Session problem with Windows 8.1

PostPosted: 30. October 2013 21:54
by DeVrije
Yeah, that problem is caused by the security! So it is solved now. Thank you very much for your excellent simple suggest!

Re: Session problem with Windows 8.1

PostPosted: 30. October 2013 22:00
by Altrea
You are welcome. Glad your problem could get solved. :)
Have fun with XAMPP and all that fancy stuff 8)