Author Topic: after successful login, the login page just reloads.  (Read 8582 times)

Offline gnarl

  • Jr. Member
  • **
  • Posts: 12
Re: Login problem
« Reply #15 on: July 27, 2007, 12:25:55 PM »
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.

Offline gnarl

  • Jr. Member
  • **
  • Posts: 12
Re: Login problem
« Reply #16 on: July 28, 2007, 06:33:37 AM »
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.

Offline gnarl

  • Jr. Member
  • **
  • Posts: 12
Re: after successful login, the login page just reloads.
« Reply #17 on: July 28, 2007, 03:30:58 PM »
Cross-posted...My bad...

interim solution here. http://roundcubeforum.net/forum/index.php?topic=1953.0

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,518
    • http://SKaero.com/
Re: after successful login, the login page just reloads.
« Reply #18 on: July 28, 2007, 05:44:41 PM »
Merge Topics ;)

Offline yinrunning

  • Newbie
  • *
  • Posts: 4
Re: after successful login, the login page just reloads.
« Reply #19 on: September 20, 2007, 04:01:51 PM »
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...

Offline Melted

  • Newbie
  • *
  • Posts: 1
Re: after successful login, the login page just reloads.
« Reply #20 on: October 31, 2007, 03:49:43 AM »
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.

Offline micha

  • Newbie
  • *
  • Posts: 2
Re: after successful login, the login page just reloads.
« Reply #21 on: November 12, 2007, 06:24:53 AM »
Maybe this is the problem what you are searching for:
http://roundcubeforum.net/forum/index.php?topic=2376.msg9459

Micha

Offline elephant

  • Newbie
  • *
  • Posts: 1
Re: after successful login, the login page just reloads.
« Reply #22 on: November 12, 2007, 11:52:06 AM »
I found a fix for this problem.
In program/include/session.inc one can see:

Code: [Select]
$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:
Code: [Select]
setcookie(session_name(), $random, time()+$cookie['lifetime'], $cookie['path']);

it worked well under Firefox and Safari.