Roundcube Community Forum
Release Support => Pending Issues => Topic started by: gnarl 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?
-
Is there any data in the session table?
-
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";
-
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...
-
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.
-
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.
-
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...
-
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'
-
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.
-
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...
-
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.
-
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?
-
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?
-
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
-
Hmm I think you maybe having this problem: http://roundcubeforum.net/forum/index.php?topic=1853.0
-
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.
-
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 (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.
-
Cross-posted...My bad...
interim solution here. http://roundcubeforum.net/forum/index.php?topic=1953.0 (http://roundcubeforum.net/forum/index.php?topic=1953.0)
-
Merge Topics ;)
-
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...
-
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.
-
Maybe this is the problem what you are searching for:
http://roundcubeforum.net/forum/index.php?topic=2376.msg9459
Micha
-
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.