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

Catchable fatal error: session_regenerate_id() #12234

Closed
al35mm opened this Issue Sep 19, 2016 · 5 comments

Comments

Projects
None yet
3 participants
@al35mm
Copy link

al35mm commented Sep 19, 2016

Using Phalcon 3.0.1 (via packagecloud), PHP 7.0.8/apache2 and php-redis (installed via apt) running on Ubuntu Xenial on vagrant machine, when doing $this->session->regenerateId() I get the following "Catchable fatal error: session_regenerate_id(): Failed to create(read) session ID: user (path: /tmp)".

In my bootstrap

$session = new \Phalcon\Session\Adapter\Redis(array(
            'uniqueId'   => $config->options['uniqueId'],
            'host'       => $config->options['host'],
            'port'       => $config->options['port'],
            'index'      => $config->options['index'],
            'persistent' => $config->options['persistent'],
            'lifetime'   => $config->options['lifetime'],
            'prefix'     => $config->options['prefix'],
            'statsKey'   => $config->options['statsKey']
        ));
        $session->start();
        return $session;

Sessions seem to be working fine apart from 'regenerateId'. The same app has no issues running on Phalcon 2.x and PHP 5.x.

I'm not sure if this issue is related to php-redis or Phalcon redis adapter, or something else!

@Jurigag

This comment has been minimized.

Copy link
Member

Jurigag commented Sep 19, 2016

Isn't thix fixed in 3.0.x ? I think it was already posted here ?

@al35mm

This comment has been minimized.

Copy link
Author

al35mm commented Sep 19, 2016

@Jurigag was this previously a problem in Phalcon's redis adaptor? If so I guess it hasn't been fixed. I suppose I may have to drop back to Phalcon 2.x and php5.x to continue development for now as it's unusable in current state :(

@Jurigag

This comment has been minimized.

Copy link
Member

Jurigag commented Sep 19, 2016

Well, you can always use other session adapter like libmemcached for example.

@al35mm

This comment has been minimized.

Copy link
Author

al35mm commented Sep 19, 2016

Yes I could do, but I want to use redis :) I have looked but can not find any other issues on this problem with Phalcon. So I'm not sure if it's a Phalcon issue or something else.

@stale

This comment has been minimized.

Copy link

stale bot commented Apr 16, 2018

Thank you for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please feel free to either reopen this issue or open a new one. We will be more than happy to look at it again! You can read more here: https://blog.phalconphp.com/post/github-closing-old-issues

@stale stale bot added the stale label Apr 16, 2018

@sergeyklay sergeyklay closed this Apr 17, 2018

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.