Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

session redundancy weird behaviour when reopening session during request #46

Closed
thesource93 opened this issue Mar 20, 2019 · 0 comments · Fixed by #76
Closed

session redundancy weird behaviour when reopening session during request #46

thesource93 opened this issue Mar 20, 2019 · 0 comments · Fixed by #76
Assignees
Labels

Comments

@thesource93
Copy link
Contributor

if session is commited, then reopened, changed and during that time key becomes missing on one of the servers in pool , session is not loaded. however after the final session_write the keys are available on both memcached instances.

eg code from tests/044.phpt

// Test lost session on server1
session_id($balanceKey1);
@session_start();
$_SESSION['key'] = 'Test2';
session_write_close();
unset($_SESSION['key']);

$result = $memcache1->delete($balanceKey1);
var_dump($result);

session_id($balanceKey1);
@session_start();
var_dump($_SESSION);
session_write_close();

// Test lost session on server2                                                                                                                                                                                    
session_id($balanceKey1);
@session_start();
$_SESSION['key'] = 'Test3';
session_write_close();
unset($_SESSION['key']);

$result = $memcache2->delete($balanceKey1);
var_dump($result);

session_id($balanceKey1);
@session_start();
var_dump($_SESSION);
session_write_close();

@tomassrnka tomassrnka mentioned this issue Mar 23, 2019
@tomassrnka tomassrnka added the bug label Mar 26, 2019
This was referenced Oct 8, 2020
@thesource93 thesource93 linked a pull request Oct 16, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants