0

I have recently got my website launched on Debian platform.

However, I keep getting this 'Error reading session data' whenever try to read the session data. I suspect it could be caused by corrupted session data.

I had tried to ini_set 'session.gc_probability' to 0, but still can't get thing right. As follows:

ini_set('session.gc_probability', 0);

And yes, it's using session 'native' driver.

Does anyone here encounter this problem before?

Your help is greatly appreciated!

DPH
  • 1
  • 1
  • Could be a bug - http://stackoverflow.com/questions/7028509/error-message-while-logging-in-in-kohana – matino Dec 04 '11 at 11:06

1 Answers1

1

So this indeed is a bug but there is a way through :)
Every time you (or system class) call Session::regenerate() method (if you use Auth, then the login function uses it), call Session::instance()->write(); right after, for example:

if (Auth::instance()->login($post['username'], $post['password']))
{
       Session::instance()->write();
       $this->request->redirect('somewhere');
}
matino
  • 17,199
  • 8
  • 49
  • 58