Roundcube Community Forum

 

after successful login, the login page just reloads.

Started by gnarl, July 12, 2007, 11:49:28 AM

Previous topic - Next topic

gnarl

Maybe. It's consistent though.
I'm going to try strategically placing some echo's into the code and see if I can't narrow down where it's failing.

I'll post back if I find anything.

gnarl

Well, putting breaks in the code just confirmed what I already thought.
The session was getting hosed.

I found this http://roundcubeforum.net/forum/index.php?topic=1660.0 thread and commenting the below suggested lines from index.php, at least lets me log in.

  // create new session ID
  unset($_SESSION['temp']);
  sess_regenerate_id();

I foresee this becoming a problem as a long-term fix, but for now, I'm ok with it.
I don't see anything blatantly wrong with the code, but I'm not one to argue with results.
Someone who's more familiar with roundcube's code should probably take a look at the session verification and see what would cause it to kill valid sessions.


SKaero


yinrunning

is the user table for RC supposed to have something in it after a fresh install??? mine is blank, and I can't login even though my hMail logging clearly shows a successful login followed by an immediate logout. the Session in DB and the Cookie are both being created...

Melted

Quote from: rknetwork I got it...

; Initialize session on request startup.
session.auto_start = 1

Set to 0 and roundcubemail works!

Developers: please fix...

Just wanted to bump this. I had tried Roundcube on several unix boxes trying to get it to work with the login-loop on each. This solved the issue for me.

It would be nice to have it work without changing the php.ini file... other than that, great software.


elephant

I found a fix for this problem.
In program/include/session.inc one can see:

$cookie = session_get_cookie_params();
 setcookie(session_name(), $random, $cookie['lifetime'], $cookie['path']);

However, $cookie['lifetime'] means cookie lifetime in seconds and using it like this sets cookie expiration
to a few seconds after 1/1/1970, 00:00:00

the line should be:
setcookie(session_name(), $random, time()+$cookie['lifetime'], $cookie['path']);

it worked well under Firefox and Safari.