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

Offline gnarl

  • Jr. Member
  • **
  • Posts: 12
after successful login, the login page just reloads.
« on: July 12, 2007, 11:49:28 AM »
After successfully logging in the login page is reloaded. URL shows "http://webmail.domain.com/?_task=mail"

System: Win2k3, IIS6, PHP 5.2.3, MySQL 5.1.19-beta, hmailserver 4.4-b270

I know that the SQL connection is working b/c I can create a new user in hmail, login as that user, and roundcube's db tables get updated for the new user. I also get a failed login if I use a non-existant hmail user.

There are no logged errors for IIS, PHP, or MySQL, but I can generate them by using bogus data or bad settings in various places.

I've tried everything that I can think of, and my guess is that it this a PHP issue somewhere. But I am new enough to PHP to not have the knowledge to look into it in any depth.

I put in a ticket, and it was suggested that it was prolly a session issue, which is where my thought process was leading. I am just out of ideas for what to look at next. Anyone have any suggestions?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,493
    • http://SKaero.com/
Re: after successful login, the login page just reloads.
« Reply #1 on: July 12, 2007, 11:53:23 AM »
Is there any data in the session table?

Offline gnarl

  • Jr. Member
  • **
  • Posts: 12
Re: after successful login, the login page just reloads.
« Reply #2 on: July 12, 2007, 12:27:35 PM »
yup...it even matches the cookie. They're obviously getting created.
cookie...

sessid
2nslcsf99smc0lhku5d4ekscc5
webmail.domain(changed).com/
1024
3687872768
29869217
288057360
29869215
*

session table data...

2nslcsf99smc0lhku5d4ekscc5    
2007-07-12 09:09:46    
2007-07-12 09:09:46    
192.168.10.2    
user_lang|s:5:"en_US";auth_time|i:1184256586;temp|b:1;task|s:4:"mail";

Offline rknetwork

  • Newbie
  • *
  • Posts: 8
Re: after successful login, the login page just reloads.
« Reply #3 on: July 12, 2007, 11:53:13 PM »
Quote from: gnarl
After successfully logging in the login page is reloaded. URL shows "http://webmail.domain.com/?_task=mail"

Exactly same issue. Same IIS, PHP and MySQL.

Also: mysql5_initial.sql, mysql_initial.sql, mysql_update.sql scripts wont work.

Sounds like a major bug...

Offline gnarl

  • Jr. Member
  • **
  • Posts: 12
Re: after successful login, the login page just reloads.
« Reply #4 on: July 12, 2007, 11:57:26 PM »
What happens to the scripts?

They ran fine for me after I turned off strict mode.

I'm assuming that not using strict mode has nothing to do with my problem since that is the default install behavior for the *nix's.
I'd love for someone to tell me I'm wrong though. This is driving me nuts.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,493
    • http://SKaero.com/
Re: after successful login, the login page just reloads.
« Reply #5 on: July 13, 2007, 12:03:36 AM »
Quote
Also: mysql5_initial.sql, mysql_initial.sql, mysql_update.sql scripts wont work.
That would be a error on your end, that means you don't have access to the database.

Offline gnarl

  • Jr. Member
  • **
  • Posts: 12
Re: after successful login, the login page just reloads.
« Reply #6 on: July 13, 2007, 02:18:43 PM »
OK...this is fixed now. I don't know how.
I am very confused and more than a little nervous about it.

I went through my php.ini and changed a bunch of settings and it started to work.
I then went back and reverted to the ini file from b4 I made any changes, so that I could checklist my way back to whichever setting was causing the problem.

Guess what? The previous php.ini now works. Go figure...

Offline rknetwork

  • Newbie
  • *
  • Posts: 8
Re: after successful login, the login page just reloads.
« Reply #7 on: July 21, 2007, 04:11:43 PM »
Quote from: SKaero
Quote
Also: mysql5_initial.sql, mysql_initial.sql, mysql_update.sql scripts wont work.
That would be a error on your end, that means you don't have access to the database.

All privileges are given.

===============
User 'webmail'@'localhost' - Database webmail : Edit Privileges

Database-specific privileges
Database    Privileges    Grant    Table-specific privileges
webmail    ALL PRIVILEGES    No    No
===============

C:\Documents and Settings\Administrator>mysql -u webmail -p
Enter password: ************************

mysql> connect webmail
Connection id:  363
Current database: webmail

mysql> source D:\Websites\Server\roundcubemail\SQL\mysql5.initial.sql
Query OK, 0 rows affected (0.00 sec)

Query OK, 0 rows affected, 1 warning (0.03 sec)

ERROR 1101 (42000): BLOB/TEXT column 'preferences' can't have a default value
Query OK, 0 rows affected, 1 warning (0.02 sec)

Query OK, 0 rows affected, 1 warning (0.05 sec)

Query OK, 0 rows affected, 1 warning (0.01 sec)

Query OK, 0 rows affected, 1 warning (0.03 sec)

Query OK, 0 rows affected (0.00 sec)

mysql> source D:\Websites\Server\roundcubemail\SQL\mysql.update.sql
ERROR 1091 (42000): Can't DROP 'body'; check that column/key exists
ERROR 1060 (42S21): Duplicate column name 'html_signature'

Offline gnarl

  • Jr. Member
  • **
  • Posts: 12
Re: after successful login, the login page just reloads.
« Reply #8 on: July 21, 2007, 04:25:14 PM »
Ahh...Try going into your my.ini and turn off SQL strict mode.
mySQL 5 seems to enable strict mode by default with the windows install.


Offline rknetwork

  • Newbie
  • *
  • Posts: 8
Re: after successful login, the login page just reloads.
« Reply #9 on: July 21, 2007, 05:59:45 PM »
Quote from: gnarl
OK...this is fixed now. I don't know how.
I am very confused and more than a little nervous about it.
Guess what? The previous php.ini now works. Go figure...

I got it...

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

Set to 0 and roundcubemail works!

Developers: please fix...

Offline rknetwork

  • Newbie
  • *
  • Posts: 8
Re: after successful login, the login page just reloads.
« Reply #10 on: July 21, 2007, 06:29:19 PM »
Quote from: gnarl
Ahh...Try going into your my.ini and turn off SQL strict mode.
mySQL 5 seems to enable strict mode by default with the windows install.

That worked.

Thanks.

Offline gnarl

  • Jr. Member
  • **
  • Posts: 12
Re: after successful login, the login page just reloads.
« Reply #11 on: July 26, 2007, 04:31:35 PM »
Quote from: gnarl
OK...this is fixed now. I don't know how.
I am very confused and more than a little nervous about it.

I went through my php.ini and changed a bunch of settings and it started to work.
I then went back and reverted to the ini file from b4 I made any changes, so that I could checklist my way back to whichever setting was causing the problem.

Guess what? The previous php.ini now works. Go figure...

Well...as I feared might happen, this has started again.

I still think it is a session problem of some kind.

It's clearly Roundcube specific as I have no problem with b2e or phpbb.

Any idea's?

Offline gnarl

  • Jr. Member
  • **
  • Posts: 12
Login problem
« Reply #12 on: July 26, 2007, 05:43:52 PM »
I think I have a different login problem now.

After a successful login, the login page just reloads.
I know I can connect to both the mail and roundcube db's. If I create a new user in hmailserver and log into roundcube, that user will be created in the roundcube db.

Both the php and roundcube sessions get written to the files directory and the cookie, but the roundcube session doesn't get written to the roundcube db.

Do I have something set wrong in php?

Offline gnarl

  • Jr. Member
  • **
  • Posts: 12
Re: Login problem
« Reply #13 on: July 27, 2007, 02:46:44 AM »
Quote from: gnarl
I think I have a different login problem now.

After a successful login, the login page just reloads.
I know I can connect to both the mail and roundcube db's. If I create a new user in hmailserver and log into roundcube, that user will be created in the roundcube db.

Both the php and roundcube sessions get written to the files directory and the cookie, but the roundcube session doesn't get written to the roundcube db.

Do I have something set wrong in php?

Ok...I got it to write the session data back to the db by dropping and re-creating the db.

Now I have session data in the db that matches the cookie, but I am still seeing just the login page after a successful login. No errors in any logs.

Win2k3, PHP 5.2.3, mySQL 5.1.19, Roundcube rc-1

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,493
    • http://SKaero.com/
Re: Login problem
« Reply #14 on: July 27, 2007, 05:19:48 AM »
Hmm I think you maybe having this problem: http://roundcubeforum.net/forum/index.php?topic=1853.0