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

php7 branch session handler error #658

Closed
zzjin opened this Issue Sep 14, 2015 · 17 comments

Comments

Projects
None yet
10 participants
@zzjin
Copy link

zzjin commented Sep 14, 2015

As talked #654 .The new php7 branch passed all current tests bu cannot be used as session_handler.

run with error:
PHP Catchable fatal error: session_regenerate_id(): Failed to create session ID: redis (path: 127.0.0.1:6379)

test code:

<?php
session_start();
session_regenerate_id();
echo session_id();

strange behaver:
using cli, everything ok.
using phpdbg cli debug crash.
using apache2handler crash.

@zzjin

This comment has been minimized.

Copy link
Author

zzjin commented Sep 14, 2015

UPDATE:
after refresh reinstall php7src error gone.

@michael-grunder

This comment has been minimized.

Copy link
Member

michael-grunder commented Sep 14, 2015

I think this might actually be a bug, as I can replicate it and I rebuilt the whole thing.

The problem, I think is related to the fact that phpredis returns FAILURE when reading empty session data (it doesn't distinguish between reading empty session data and a failure to communicate with redis at all).

I think the fix is simple, but I'll look in the morning

@zzjin

This comment has been minimized.

Copy link
Author

zzjin commented Sep 24, 2015

after upgrade to
7.0.0rc3
same error on session_regenerate_id

@michael-grunder

This comment has been minimized.

Copy link
Member

michael-grunder commented Sep 29, 2015

I think I know how to fix this issue and will reference this thread when I get an attempted fix up. I need to instrument one library function (or create a one-off version) to distinguish between an empty read and an error.

@dingdayu

This comment has been minimized.

Copy link

dingdayu commented Oct 2, 2015

For php_redis.dll php7 to send me a copy? mail:614422099@qq.com
I have been compiling not successful

@austinh

This comment has been minimized.

Copy link

austinh commented Oct 25, 2015

Same problem here! Any fix?

I should note that I am using msgpack session serialize function as well, if this makes a difference.

@lutel

This comment has been minimized.

Copy link

lutel commented Oct 31, 2015

Same problem, PHP 7 RC5

PHP Catchable fatal error: session_regenerate_id(): Failed to create session ID: user (path: /tmp) in /www/program/lib/Roundcube/rcube_session.php on line 428

@C1n

This comment has been minimized.

Copy link

C1n commented Nov 11, 2015

And on PHP7 RC6

PHP Catchable fatal error: session_regenerate_id(): Failed to create session ID: user (path: /var/www/tmp) in /var/www/html/ro$tml/roundcubemail-1.1.3/program/lib/Roundcube/rcube_session.php on line 436

@michael-grunder

This comment has been minimized.

Copy link
Member

michael-grunder commented Nov 11, 2015

Yeah I know what this is. I'm going to see if I can find a novel solution.

@michael-grunder

This comment has been minimized.

Copy link
Member

michael-grunder commented Nov 11, 2015

I've pushed an attempted fix to the php7 branch. Can you guys try it and see if it works for you? It's working for me locally but I haven't given it extensive tests.

@zzjin

This comment has been minimized.

Copy link
Author

zzjin commented Nov 13, 2015

Tested with newest phprc7 and php7 branch. Everything seems right now.

@C1n

This comment has been minimized.

Copy link

C1n commented Nov 13, 2015

For me too.

@zzjin zzjin closed this Nov 13, 2015

@polonadoo

This comment has been minimized.

Copy link

polonadoo commented May 2, 2016

Hi Michael can you send me the fix per e-mail : marko@polonadoo.si

@dmytro-pe

This comment has been minimized.

Copy link

dmytro-pe commented Nov 29, 2016

Hello Michael, can you send me fix please too: dmitry.p@me.com. Thanks.

@larzuk91

This comment has been minimized.

Copy link

larzuk91 commented Jun 9, 2017

Where can I find the fix ? I just upgraded to php7 and my roundcube webmail can't start sessions anymore =/

PHP Warning: session_start(): Failed to read session data: user (path: /tmp) in /var/www/webmail/program/include/rcmail.php on line 784

And from the web I get this message: "Invalid session or it has expired"

@michael-grunder

This comment has been minimized.

Copy link
Member

michael-grunder commented Jun 9, 2017

Hey,

What version of phpredis are you running? It appears that the fix for differentiating between empty session data and false is in the commit history.

@kremsy

This comment has been minimized.

Copy link

kremsy commented Sep 21, 2017

Have the same issue, any way to get the fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.