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 use redis Adapter can't to destroy the data in php7 #12326

Closed
bain2018 opened this issue Oct 16, 2016 · 10 comments
Closed

session use redis Adapter can't to destroy the data in php7 #12326

bain2018 opened this issue Oct 16, 2016 · 10 comments
Assignees
Labels
bug A bug report status: low Low
Milestone

Comments

@bain2018
Copy link

when i use the redis as the session Adapter;
i can't destroy all of the session data
phalcon 3.0.1
php 7

@sergeyklay sergeyklay added Need information need script to reproduce Script is required to reproduce the issue labels Oct 16, 2016
@bain2018
Copy link
Author

bain2018 commented Nov 4, 2016

did u finish this bug?

@Yurist-85
Copy link

This is a BUG.
Faced with such problem on Phalcon v2 + PHP 5.6.
Look in source code. Incorrect behaviour of this Adapter is from the beginning.
Just compare original Adapter and Redis Adapter.
No need in any row of script "to reproduce" it. It simply works wrong.

@Jurigag
Copy link
Contributor

Jurigag commented Nov 24, 2016

What you mean no script to reproduce ? Then how to recreate this issue without any code ? For example someone is not using redis adapter - then he doesnt have such a bug. Script to reproduce is surely needed.

@Yurist-85
Copy link

There's no need to recreate it. Look in source code. If your brain works fine I'll see that there're absolutely different behaviours of ->destroy() methods in original Adapter and Redis Adapter.

@sergeyklay
Copy link
Member

I'm closing this issue due to the lack of any reaction. I'll open it again if the need arises

@gamalan
Copy link

gamalan commented May 1, 2017

I also happen to facing this, i think this is because the implementation of destroy between Adapter and RedisAdapter when destroying is totally different.

in adapter.zep

public function destroy(boolean removeData = false) -> boolean

but in redis.zep

public function destroy(string sessionId = null) -> boolean

and yet in the php stub,

public function destroy($removeData = false)

Can you tell what kind of script you need to reproduce? I'd like to help to help if possible.

The only way to destroy the session is by remove one by one, or using session_destroy. Which is problematic i think.

@gamalan
Copy link

gamalan commented May 1, 2017

also, in both adapter.zep and libmemcached.zep, this is implemented in destroy function.

for key, _ in _SESSION {
	unset _SESSION[key];
}

yet in memcache.zep and redis.zep, this is not implemented.

@sergeyklay sergeyklay reopened this May 1, 2017
@sergeyklay
Copy link
Member

@gamalan I'll try to sort out asap

@sergeyklay sergeyklay removed Need information need script to reproduce Script is required to reproduce the issue labels May 1, 2017
@sergeyklay sergeyklay added this to the 3.2.0 milestone May 1, 2017
@sergeyklay
Copy link
Member

@gamalan #12833

@sergeyklay
Copy link
Member

Fixed in the 3.2.x branch. Feel free to open new issue if the problem appears again. Thank you for contributing.

@niden niden added bug A bug report status: low Low labels Dec 23, 2019
@niden niden removed the Bug - Low label Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug report status: low Low
Projects
None yet
Development

No branches or pull requests

6 participants