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

Comments

Projects
None yet
5 participants
@bain2018

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

@bain2018

This comment has been minimized.

Show comment
Hide comment
@bain2018

bain2018 Nov 4, 2016

did u finish this bug?

bain2018 commented Nov 4, 2016

did u finish this bug?

@Yurist-85

This comment has been minimized.

Show comment
Hide comment
@Yurist-85

Yurist-85 Nov 24, 2016

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.

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

This comment has been minimized.

Show comment
Hide comment
@Jurigag

Jurigag Nov 24, 2016

Member

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.

Member

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

This comment has been minimized.

Show comment
Hide comment
@Yurist-85

Yurist-85 Nov 24, 2016

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.

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

This comment has been minimized.

Show comment
Hide comment
@sergeyklay

sergeyklay Dec 24, 2016

Member

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

Member

sergeyklay commented Dec 24, 2016

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

@sergeyklay sergeyklay closed this Dec 24, 2016

@gamalan

This comment has been minimized.

Show comment
Hide comment
@gamalan

gamalan 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 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

This comment has been minimized.

Show comment
Hide comment
@gamalan

gamalan 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.

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

This comment has been minimized.

Show comment
Hide comment
@sergeyklay

sergeyklay May 1, 2017

Member

@gamalan I'll try to sort out asap

Member

sergeyklay commented May 1, 2017

@gamalan I'll try to sort out asap

@sergeyklay

This comment has been minimized.

Show comment
Hide comment
@sergeyklay

This comment has been minimized.

Show comment
Hide comment
@sergeyklay

sergeyklay Jun 1, 2017

Member

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

Member

sergeyklay commented Jun 1, 2017

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

@sergeyklay sergeyklay closed this Jun 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment