Forums | Mahara Community

Support /
Upgrade from 1.5 to 1.9. fails


Dan Tina's profile picture
Posts: 20

29 July 2014, 21:41

Hi,

I am trying to upgrade our Mahara site from 1.5 to the latest version (1.9.1) and it has failed.  The following are the steps:

  1. First tried direct upgrade from 1.5 to 1.9
    1. ERROR: A column of your database is using a collation that is not the same as the database default. Please ensure all columns use the same collation as the database
    2. Tried changing the Database charset – didn’t work.
  2. Checked the dump file and found some charsets is utf8 but COLLATE is utf8_bin.
    1. Thought this may be the problem and tried changing for each table (got a script for this) and tried upgrading mahara again – didn’t work (same ERROR message)
    2. Opened the dump file again and found some charsets still unchanged.
    3. Manually changed them, dropped the DB and recreated it, loaded dumped tables … and tried again.
  3. Now stuck on this error

    Failed to get a recordset: mysql error: [1062: Duplicate entry 'auth_remove_old_session_files' for key 'cron_cal_uk'] in adodb_throw(INSERT INTO "cron" ("callfunction", "minute", "hour", "day", "month", "dayofweek") VALUES ('auth_remove_old_session_files', '30', '20', '*', '*', '*'), ) Command was: INSERT INTO "cron" ("callfunction", "minute", "hour", "day", "month", "dayofweek") VALUES (?, ?, ?, ?, ?, ?) and values was (auth_remove_old_session_files,30,20,*,*,*)

    Call stack (most recent first):

    • insert_record("cron", object(stdClass)) at /var/www/mahara17upgrade/lib/db/upgrade.php:138
    • xmldb_core_upgrade(null) at /var/www/mahara17upgrade/lib/upgrade.php:311

    upgrade_core(object(stdClass)) at /var/www/mahara17upgrade/admin/upgrade.json.php:95

  4. Next tried step upgrade i.e. upgrading in steps up to 1.9.  So tried 1.5 to 1.7 and got the same errors as above

We've been able to install Mahara 1.9 fresh on the same server by unable to upgrade. We need to be able to upgrade and move students' date across from the old system so please help.

I have a screenshot but unsure if I'll be able to upload the screenshot.

Thanks and best regards,

Dantina

Robert Lyon's profile picture
Posts: 773

30 July 2014, 12:13

Hi Dan,

By the sounds of things there is a row 'auth_remove_old_session_files' in your cron database table in the pre update database that is not expected by the upgrade and so is trying to add the row again - hence the error 'Duplicate entry ...'

looking at the error line: xmldb_core_upgrade(null) it seems as though the system is trying to upgrade from the beginning rather than from 1.5

In your database config file - what is the 'version' value set to?

Cheers

Robert

 

Dan Tina's profile picture
Posts: 20

06 August 2014, 0:59

Hi Robert,

I am sorry I missed your response somehow.  I hope you are still able to help.  I've check the config file and the there was no version value set. But the upgrade page did say upgrade from 1.5.1 to 1.9.1 - I've a screenshot of the error  but I can't seem to include the image with this post.

Regards,
Dantina

Robert Lyon's profile picture
Posts: 773

06 August 2014, 8:32

Hi Dan,

Ah I might have led you slightly wrong when I said config file - I meant the config table in the database.

To check that the version number is there you can run:

    SELECT value FROM config WHERE field = 'version';

And it should be something like: 2012041004 (as that is the version number for release 1.5.1)

If it is missing then run this:

    INSERT INTO config VALUES('version', '2012041004');

FYI: The release number that gets displayed in the upgrade screen comes from:

    SELECT value FROM config WHERE field = 'release';

Hope this helps

Robert

Dan Tina's profile picture
Posts: 20

07 August 2014, 18:55

Hi Robert,

Thanks for following up and clarifying - half my fault, you did say database; got distracted by the 'file' part I guess-:).  I've checked the config value in the database and it is 2012041004 - so it doesn't look like that's the problem unfortunately.

Regards,

Dantina

5 results