Roundcube Community Forum

Release Support => Release Discussion => Topic started by: vlastaw on January 20, 2013, 08:39:42 PM

Title: Can not login after 0.9 Beta upgrade + MSSQL
Post by: vlastaw on January 20, 2013, 08:39:42 PM
I just upgraded my test server from 0.8.3. to 0.9 beta, but I am locked of the application - no users are able to log in. Login attempt causes log in page to reload and display "Your session is invalid or expired." error.

Error log states:

[21-Jan-2013 02:30:49 +0100]: DB Error: [242] [Microsoft][SQL Server Native Client 11.0][SQL Server]Převod datového typu varchar na datový typ datetime vrátil hodnotu mimo rozsah. in D:\www\_roundcube\program\lib\Roundcube\rcube_db.php on line 415 (POST /?_task=login&_action=login)
[21-Jan-2013 02:30:49 +0100]: DB Error: [242] [Microsoft][SQL Server Native Client 11.0][SQL Server]Převod datového typu varchar na datový typ datetime vrátil hodnotu mimo rozsah. in D:\www\_roundcube\program\lib\Roundcube\rcube_db.php on line 415 (GET /?_task=mail)

Převod datového typu varchar na datový typ datetime vrátil hodnotu mimo rozsah = Conversion of varchar datatype to datetime datatype was out of range.

I tried to use new empty databse with the initial SQL script applied, but still the same error.

Config: Windows Server 2012 / IIS 8 (PHP 5.4.11) + MS SQL 2012 (php_pdo_sqlsrv), active plugins: 'additional_message_headers', 'autologon', 'login_info', 'userinfo', 'vcard_attachments', 'serverinfo', 'antiBruteForce', 'html5_notifier', 'contextmenu'

Is this a bug? What can I do to fix it? Thanks
Title: Re: Can not login after 0.9 Beta upgrade + MSSQL
Post by: SKaero on January 20, 2013, 09:01:33 PM
It maybe a bug, MSSQL is not as well tested as other database types. Does the problem occur without any plugins enabled?
Title: Re: Can not login after 0.9 Beta upgrade + MSSQL
Post by: vlastaw on January 20, 2013, 09:05:55 PM
Yes, it does.

What can I do to help find the bug, if anything?

Thanks
Title: Re: Can not login after 0.9 Beta upgrade + MSSQL
Post by: SKaero on January 20, 2013, 11:42:34 PM
Please file a bug report at http://trac.roundcube.net/
Title: Re: Can not login after 0.9 Beta upgrade + MSSQL
Post by: alec on January 21, 2013, 03:11:52 AM
First of all you should try with disabled plugins. Then you should enable sql_debug to see what queries are exactly sent to the database.
Title: Re: Can not login after 0.9 Beta upgrade + MSSQL
Post by: vlastaw on January 21, 2013, 03:30:21 AM
OK, here we go (replaced client IP, mail_host and hostname in mail login):

Code: [Select]
[21-Jan-2013 09:24:16 +0100]: [1] SELECT vars, ip, changed FROM session WHERE sess_id = 'sgmst8a4ukdfteopnib4lgo2f0';
[21-Jan-2013 09:24:16 +0100]: [2] INSERT INTO session (sess_id, vars, ip, created, changed) VALUES ('sgmst8a4ukdfteopnib4lgo2f0', 'dGVtcHxiOjE7bGFuZ3VhZ2V8czo1OiJlbl9VUyI7dGFza3xzOjU6ImxvZ2luIjs=', 'IP', '2013-01-21 09:24:16', '2013-01-21 09:24:16');
[21-Jan-2013 09:24:28 +0100]: [1] SELECT vars, ip, changed FROM session WHERE sess_id = 'sgmst8a4ukdfteopnib4lgo2f0';
[21-Jan-2013 09:24:28 +0100]: [2] DELETE FROM session WHERE sess_id = 'sgmst8a4ukdfteopnib4lgo2f0';
[21-Jan-2013 09:24:28 +0100]: [3] SELECT * FROM users WHERE mail_host = 'host' AND username = 'vlasta@host';
[21-Jan-2013 09:24:29 +0100]: [4] UPDATE users SET last_login = getdate() WHERE user_id = '2';
[21-Jan-2013 09:24:29 +0100]: [5] INSERT INTO session (sess_id, vars, ip, created, changed) VALUES ('08iglgvg6dbvf0n72hr5q6h196', 'bGFuZ3VhZ2V8czo1OiJlbl9VUyI7c2tpbnxzOjU6ImxhcnJ5IjtpbWFwX25hbWVzcGFjZXxhOjQ6e3M6ODoicGVyc29uYWwiO2E6MTp7aTowO2E6Mjp7aTowO3M6MDoiIjtpOjE7czoxOiIuIjt9fXM6NToib3RoZXIiO047czo2OiJzaGFyZWQiO2E6MTp7aTowO2E6Mjp7aTowO3M6NzoiI1B1YmxpYyI7aToxO3M6MToiLiI7fX1zOjY6InByZWZpeCI7czowOiIiO31pbWFwX2RlbGltaXRlcnxzOjE6Ii4iO3VzZXJfaWR8czoxOiIyIjt1c2VybmFtZXxzOjE4OiJ2bGFzdGFAamFvc29ibmUuY3oiO3N0b3JhZ2VfaG9zdHxzOjExOiJqYW9zb2JuZS5jeiI7c3RvcmFnZV9wb3J0fGk6MTQzO3N0b3JhZ2Vfc3NsfE47cGFzc3dvcmR8czozMjoiOFpmUW1vTG1oanZiWitTWWhCNkh6aW4vWWdWeFRhamQiO2xvZ2luX3RpbWV8aToxMzU4NzU2NjY5O3RpbWV6b25lfHM6MTM6IkV1cm9wZS9CZXJsaW4iOw==', 'IP', '2013-01-21 09:24:29', '2013-01-21 09:24:29');
[21-Jan-2013 09:24:29 +0100]: [1] SELECT vars, ip, changed FROM session WHERE sess_id = '08iglgvg6dbvf0n72hr5q6h196';
[21-Jan-2013 09:24:29 +0100]: [2] INSERT INTO session (sess_id, vars, ip, created, changed) VALUES ('08iglgvg6dbvf0n72hr5q6h196', 'dGVtcHxiOjE7bGFuZ3VhZ2V8czo1OiJlbl9VUyI7dGFza3xzOjU6ImxvZ2luIjs=', 'IP', '2013-01-21 09:24:29', '2013-01-21 09:24:29');