Author Topic: Update failed due to DB structure. Update script doesn't work  (Read 9208 times)

Offline ehansen

  • Newbie
  • *
  • Posts: 6
Update failed due to DB structure. Update script doesn't work
« on: February 17, 2015, 09:34:27 PM »
Could anyone please help me with this error?  I am upgrading roundcube from v 8.6 to 1.1.0:

Check DB config
DSN (write):  OK
PHP Fatal error: Class 'rcube_utils' not found in /usr/share/roundcubemail/bin/updatedb.sh on line 27

Database schema update failed.
DB Schema:  NOT OK(Database schema differs)

    Missing columns in table 'cache': expires
    Missing table 'cache_shared'
    Missing columns in table 'cache_index': expires
    Missing columns in table 'cache_thread': expires
    Missing columns in table 'cache_messages': expires
    Missing table 'system'

My php version is php-5.4.16-23

Offline ehansen

  • Newbie
  • *
  • Posts: 6
Re: Update failed due to DB structure. Update script doesn't work
« Reply #1 on: February 17, 2015, 11:32:41 PM »
I was able to fix this by running the db updates manually as in:

http://www.roundcubeforum.net/index.php/topic,20023.msg56100.html#msg56100

...however after going through the install  / config process with no errors I am now landing on a blank page when I try hitting the login page. 

I don't have any .htaccess files.

There are some errors in the session log like so:
Quote
[15-Feb-2015 09:30:54 -0800]: Session authentication failed for 6vaqqa181sltkjd6bjhau38225; invalid auth cookie sent; timeslot = 2015-02-15 09:20:00
[15-Feb-2015 09:31:45 -0800]: Session auth check failed for 6vaqqa181sltkjd6bjhau38225; timeslot = 2015-02-15 09:30:00
[15-Feb-2015 09:31:45 -0800]: Session authentication failed for 6vaqqa181sltkjd6bjhau38225; invalid auth cookie sent; timeslot = 2015-02-15 09:20:00
[15-Feb-2015 09:34:10 -0800]: Session auth check failed for 6vaqqa181sltkjd6bjhau38225; timeslot = 2015-02-15 09:30:00
[15-Feb-2015 09:34:10 -0800]: Session authentication failed for 6vaqqa181sltkjd6bjhau38225; invalid auth cookie sent; timeslot = 2015-02-15 09:20:00
[15-Feb-2015 09:36:08 -0800]: Aborted session 6vaqqa181sltkjd6bjhau38225; no valid session data found
[17-Feb-2015 16:09:20 -0800]: Aborted session 326j2knjkkbu2hrnoc2gaiqlh3; no valid session data found
[17-Feb-2015 18:01:06 -0800]: Aborted session 82v6je7qh76ej8daorc7b35jp1; no valid session data found

I have tried clearing out the session table but that does nothing.

Offline ehansen

  • Newbie
  • *
  • Posts: 6
Re: Update failed due to DB structure. Update script doesn't work
« Reply #2 on: February 17, 2015, 11:37:06 PM »
Also seeing this in the apache error log:

Code: [Select]
[Tue Feb 17 12:34:58.892291 2015] [:error] [pid 2452] [client x.x.x.x:52802] PHP Fatal error:  Call to undefined method rcube_template::nocacheing_headers() in /usr/share/roundcubemail/index.php on line 46
[Tue Feb 17 12:34:58.893049 2015] [:error] [pid 2452] [client x.x.x.x:52802] MDB2 Error: constraint violation (-3): _doQuery: [Error message: Could not execute statement]\n[Last executed query: INSERT INTO session (sess_id, vars, ip, created, changed) VALUES ('j94839sgr9nqmaqjr30huteq86', 'dGVtcHxiOjE7bGFuZ3VhZ2V8czo1OiJlbl9VUyI7dGFza3xzOjU6ImxvZ2luIjs=', 'x.x.x.x', '2015-02-17 12:34:58', '2015-02-17 12:34:58')]\n[Native code: 1062]\n[Native message: Duplicate entry 'j94839sgr9nqmaqjr30huteq86' for key 'PRIMARY']\n

Offline alec

  • Hero Member
  • *****
  • Posts: 1,365
Re: Update failed due to DB structure. Update script doesn't work
« Reply #3 on: February 18, 2015, 08:08:15 AM »
Code: [Select]
[Tue Feb 17 12:34:58.892291 2015] [:error] [pid 2452] [client x.x.x.x:52802] PHP Fatal error:  Call to undefined method rcube_template::nocacheing_headers() in /usr/share/roundcubemail/index.php on line 46
[Tue Feb 17 12:34:58.893049 2015] [:error] [pid 2452] [client x.x.x.x:52802] MDB2 Error: constraint violation (-3): _doQuery: [Error message: Could not execute statement]\n[Last executed query: INSERT INTO session (sess_id, vars, ip, created, changed) VALUES ('j94839sgr9nqmaqjr30huteq86', 'dGVtcHxiOjE7bGFuZ3VhZ2V8czo1OiJlbl9VUyI7dGFza3xzOjU6ImxvZ2luIjs=', 'x.x.x.x', '2015-02-17 12:34:58', '2015-02-17 12:34:58')]\n[Native code: 1062]\n[Native message: Duplicate entry 'j94839sgr9nqmaqjr30huteq86' for key 'PRIMARY']\n
[/quote]

There's no such code in Roundcube 1.1. Looks like update didn't move/overwrite all files.

Offline ehansen

  • Newbie
  • *
  • Posts: 6
Re: Update failed due to DB structure. Update script doesn't work
« Reply #4 on: February 24, 2015, 06:15:16 PM »
Yep, this was the problem.  I messed up the file copy somehow.   8)