Forums | Mahara Community

Support /
Unable to Upgrade to 17.10.1 from 17.04.4


Peter Westebbe's profile picture
Posts: 24

11 January 2018, 21:42

When starting the upgrade I get the message cor upgrade failed.

It seems there is something wrong with the languagepack. What can I do to fix it?

 

AH01071: Got error 'PHP message: [WAR] 8c (lib/mahara.php:627) Unable to read language directory /var/www/vhosts/mahara.vhs-bayern.de/maharadata/langpacks/__MACOSX/lang/\nPHP message: Call stack (most recent first):\nPHP message: * log_message(string(size 106), integer, true, true) at /var/www/vhosts/mahara.vhs-bayern.de/httpdocs/lib/errors.php:95\nPHP message: * log_warn(string(size 106)) at /var/www/vhosts/mahara.vhs-bayern.de/httpdocs/lib/mahara.php:627\nPHP message: * get_languages() at /var/www/vhosts/mahara.vhs-bayern.de/httpdocs/lib/web.php:4449\nPHP message: * language_select_form() at /var/www/vhosts/mahara.vhs-bayern.de/httpdocs/lib/web.php:160\nPHP message: * smarty() at /var/www/vhosts/mahara.vhs-bayern.de/httpdocs/admin/index.php:80\nPHP message: \n', referer: https://mahara.vhs-bayern.de/admin/index.php    Apache-Fehler
AH01071: Got error 'PHP message: [WAR] 37 (lib/mahara.php:627) Unable to read language directory /var/www/vhosts/mahara.vhs-bayern.de/maharadata/langpacks/__MACOSX/lang/\nPHP message: Call stack (most recent first):\nPHP message: * log_message(string(size 106), integer, true, true) at /var/www/vhosts/mahara.vhs-bayern.de/httpdocs/lib/errors.php:95\nPHP message: * log_warn(string(size 106)) at /var/www/vhosts/mahara.vhs-bayern.de/httpdocs/lib/mahara.php:627\nPHP message: * get_languages() at /var/www/vhosts/mahara.vhs-bayern.de/httpdocs/lib/web.php:4449\nPHP message: * language_select_form() at /var/www/vhosts/mahara.vhs-bayern.de/httpdocs/lib/web.php:160\nPHP message: * smarty() at /var/www/vhosts/mahara.vhs-bayern.de/httpdocs/index.php:89\nPHP message: \n', referer: https://mahara.vhs-bayern.de/admin/index.php

Robert Lyon's profile picture
Posts: 749

12 January 2018, 10:21

Hi Peter

The error is saying Mahara can't read '/var/www/vhosts/mahara.vhs-bayern.de/maharadata/langpacks/__MACOSX/lang/' directory.

As none of the langpack dirs should be '_MACOSX' I suspect that directory has been added by something else.

You should be able to move that directory out of the way and try again.

Cheers

Robert

Peter Westebbe's profile picture
Posts: 24

13 January 2018, 0:56

Hi Robert,

after deleting _MACOSX and starting a new upgrade I got the same error message "Update failed".

The error protocoll:

AH01071: Got error 'PHP message: [WAR] 9a (lib/errors.php:859) Failed to get a recordset: mysqli error: [1054: Unknown column 'time' in 'field list'] in EXECUTE("SELECT event, data, time\nPHP message: [WAR] 9a (lib/errors.php:859) FROM "event_log"\nPHP message: [WAR] 9a (lib/errors.php:859) WHERE event = 'createuser'\nPHP message: [WAR] 9a (lib/errors.php:859) AND POSITION(',"password":"",' IN data) = 0\nPHP message: [WAR] 9a (lib/errors.php:859) ")Command was: SELECT event, data, time\nPHP message: [WAR] 9a (lib/errors.php:859) FROM "event_log"\nPHP message: [WAR] 9a (lib/errors.php:859) WHERE event = ?\nPHP message: [WAR] 9a (lib/errors.php:859) AND POSITION(',"password":"",' IN data) = 0\nPHP message: [WAR] 9a (lib/errors.php:859) and values was (0:createuser)\nPHP message: Call stack (most recent first):\nPHP message: * log_message(string(size 693), integer, true, true) at /var/www/vhosts/mahara.vhs-bayern.de/httpdocs/lib/errors.php:95\nPHP message: * log_warn(string(size 693)) at /var/www/vhosts/mahara.vhs-bayern.de/httpdocs/lib/errors.php:859\nPHP message: * SQLException->__construct(string(size 693)) at /var/www/vhosts/mahara.vhs-bayern.de/httpdocs/lib/dml.php:517\nPHP message: * get_recordset_sql(string(size 269), array(size 1), string(size 0), string(size 0)) at /var/www/vhosts/mahara.vhs-bayern.de/httpdocs/lib/dml.php:714\nPHP message: * get_records_sql_array(string(size 269), array(size 1)) at /var/www/vhosts/mahara.vhs-bayern.de/httpdocs/lib/db/upgrade.php:4986\nPHP message: * xmldb_core_upgrade(string(size 10)) at /var/www/vhosts/mahara.vhs-bayern.de/httpdocs/lib/upgrade.php:347\nPHP message: * upgrade_core(object(stdClass)) at /var/www/vhosts/mahara.vhs-bayern.de/httpdocs/admin/upgrade.json.php:87\nPHP message: \n', referer: https://mahara.vhs-bayern.de/admin/upgrade.php

Does this help?

Cheers

Peter

Robert Lyon's profile picture
Posts: 749

05 February 2018, 13:49

Hi Peter,

Yes that does help, thank you.

Ok there is an error in Mahara upgrade process - I'll begin a patch for that https://bugs.launchpad.net/mahara/+bug/1747320 - but in the meantime you should be able to change the word 'time' to 'ctime' in line 4982 in htdocs/lib/db/upgrade.php

Cheers

Robert

Peter Westebbe's profile picture
Posts: 24

22 February 2018, 22:20

Hi Robert,

the problem is solved. We are now updated to 17.10 without problems.

Thank you very much for your help.

Warm regards

Peter

Stitou Sophie's profile picture
Posts: 15

23 February 2018, 2:38

Hi Robert, 

after the problem you ve resolved for me,

i have the same problem and i made the change in the upgrade.php

now i have this, the update is made at middle (excuse my english)

error update.PNG

I have an other problem, i always login by moodle, and i can't access directly, i search a user admin in the database but i don't see any table user only remote users. Can you help me another time. 

Thanks in advance

 

 

Robert Lyon's profile picture
Posts: 749

01 March 2018, 9:52

Hello Sophie,

Are you able to view the error logs for the site? They may have more information as to why the upgrade is failing.

If you can't view error logs then temporarily adding

 $cfg->productionmode = false;

to the config.php file before running the upgrade should show more information to the screen during the upgrade process and help with which part is actually failing

Cheers

Robert

Stitou Sophie's profile picture
Posts: 15

01 March 2018, 22:56

I've no more  error in the simple error.log since you've solved my problem with the ";" 

but in the admin error log i have this : 

[28-Feb-2018 13:48:56 Europe/Paris] [DBG] a7 (lib/db/upgrade.php:5178) Adjust existing "event_log" data for "saveview" and "deleteview" events
[28-Feb-2018 13:48:56 Europe/Paris] [DBG] a7 (lib/dml.php:157) mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'JSON ), '$.id')
[28-Feb-2018 13:48:56 Europe/Paris] [DBG] a7 (lib/dml.php:157)                     SET e.resourceid   = JSON_EXTRACT( CAST( e.d' at line 2] in EXECUTE("UPDATE "mhcb_event_log" e
[28-Feb-2018 13:48:56 Europe/Paris] [DBG] a7 (lib/dml.php:157)                     LEFT JOIN "mhcb_view" v ON v.id = JSON_EXTRACT( CAST( e.data AS JSON ), '$.id')
[28-Feb-2018 13:48:56 Europe/Paris] [DBG] a7 (lib/dml.php:157)                     SET e.resourceid   = JSON_EXTRACT( CAST( e.data AS JSON ), '$.id'),
[28-Feb-2018 13:48:56 Europe/Paris] [DBG] a7 (lib/dml.php:157)                         e.resourcetype = 'view',
[28-Feb-2018 13:48:56 Europe/Paris] [DBG] a7 (lib/dml.php:157)                         e.ownerid      = v.owner,
[28-Feb-2018 13:48:56 Europe/Paris] [DBG] a7 (lib/dml.php:157)                         e.ownertype    = CASE WHEN v.owner IS NULL THEN NULL ELSE 'view' END
[28-Feb-2018 13:48:56 Europe/Paris] [DBG] a7 (lib/dml.php:157)                     WHERE e.event IN ('saveview', 'deleteview')")Command was: UPDATE "mhcb_event_log" e
[28-Feb-2018 13:48:56 Europe/Paris] [DBG] a7 (lib/dml.php:157)                     LEFT JOIN "mhcb_view" v ON v.id = JSON_EXTRACT( CAST( e.data AS JSON ), '$.id')
[28-Feb-2018 13:48:56 Europe/Paris] [DBG] a7 (lib/dml.php:157)                     SET e.resourceid   = JSON_EXTRACT( CAST( e.data AS JSON ), '$.id'),
[28-Feb-2018 13:48:56 Europe/Paris] [DBG] a7 (lib/dml.php:157)                         e.resourcetype = 'view',
[28-Feb-2018 13:48:56 Europe/Paris] [DBG] a7 (lib/dml.php:157)                         e.ownerid      = v.owner,
[28-Feb-2018 13:48:56 Europe/Paris] [DBG] a7 (lib/dml.php:157)                         e.ownertype    = CASE WHEN v.owner IS NULL THEN NULL ELSE 'view' END
[28-Feb-2018 13:48:56 Europe/Paris] [DBG] a7 (lib/dml.php:157)                     WHERE e.event IN ('saveview', 'deleteview')
[28-Feb-2018 13:48:56 Europe/Paris] [WAR] a7 (lib/errors.php:859) Could not execute command: UPDATE "mhcb_event_log" e
[28-Feb-2018 13:48:56 Europe/Paris] [WAR] a7 (lib/errors.php:859)                     LEFT JOIN "mhcb_view" v ON v.id = JSON_EXTRACT( CAST( e.data AS JSON ), '$.id')
[28-Feb-2018 13:48:56 Europe/Paris] [WAR] a7 (lib/errors.php:859)                     SET e.resourceid   = JSON_EXTRACT( CAST( e.data AS JSON ), '$.id'),
[28-Feb-2018 13:48:56 Europe/Paris] [WAR] a7 (lib/errors.php:859)                         e.resourcetype = 'view',
[28-Feb-2018 13:48:56 Europe/Paris] [WAR] a7 (lib/errors.php:859)                         e.ownerid      = v.owner,
[28-Feb-2018 13:48:56 Europe/Paris] [WAR] a7 (lib/errors.php:859)                         e.ownertype    = CASE WHEN v.owner IS NULL THEN NULL ELSE 'view' END
[28-Feb-2018 13:48:56 Europe/Paris] [WAR] a7 (lib/errors.php:859)                     WHERE e.event IN ('saveview', 'deleteview')
[28-Feb-2018 13:48:56 Europe/Paris] Call stack (most recent first):
[28-Feb-2018 13:48:56 Europe/Paris]   * log_message(string(size 496), integer, true, true) at /home/sio57/mahara.sio57.info/mahara/lib/errors.php:95
[28-Feb-2018 13:48:56 Europe/Paris]   * log_warn(string(size 496)) at /home/sio57/mahara.sio57.info/mahara/lib/errors.php:859
[28-Feb-2018 13:48:56 Europe/Paris]   * SQLException->__construct(string(size 496)) at /home/sio57/mahara.sio57.info/mahara/lib/dml.php:158
[28-Feb-2018 13:48:56 Europe/Paris]   * execute_sql(string(size 469)) at /home/sio57/mahara.sio57.info/mahara/lib/db/upgrade.php:5186
[28-Feb-2018 13:48:56 Europe/Paris]   * xmldb_core_upgrade(string(size 10)) at /home/sio57/mahara.sio57.info/mahara/lib/upgrade.php:347
[28-Feb-2018 13:48:56 Europe/Paris]   * upgrade_core(object(stdClass)) at /home/sio57/mahara.sio57.info/mahara/admin/upgrade.json.php:87
[28-Feb-2018 13:48:56 Europe/Paris] 


thank you for help,
Robert Lyon's profile picture
Posts: 749

06 March 2018, 13:14

Hi Sophie,

Your current error relates to the type of MySQL you are using - the MariaDB doesn't handle type casting JSON at the moment.

I've added a patch to our review system to sort this problem https://reviews.mahara.org/#/c/8556/

Please try upgrading again with the patch/changes in place

Cheers

Robert

 

Stitou Sophie's profile picture
Posts: 15

06 March 2018, 22:40

Hi Robert, 

it's a very long help ...i sleep when you work and you sleep when i tested :-)

i ve changed the upgrade php like you said with the dml (i have test with the 2 versions).

and i ve this message when i upgrade "A nonrecoverable error occurred. This probably means you have encountered a bug in the system"

I have no error in general error.log beacause i can't connect

i have now this error in lib/error.log 

    03-Mar-2018 19:13:01 Europe/Paris] [WAR] 87 (init.php:188) Mahara could not connect to the application database.
    [03-Mar-2018 19:13:01 Europe/Paris] [WAR] 87 (init.php:188)
     [03-Mar-2018 19:13:01 Europe/Paris] [WAR] 87 (init.php:188) * If you are using Mahara, please wait a minute and try again
    [03-Mar-2018 19:13:01 Europe/Paris] [WAR] 87 (init.php:188) * If you are the administrator, please check your database        settings and make sure your database is available
    [03-Mar-2018 19:13:01 Europe/Paris] [WAR] 87 (init.php:188)
    [03-Mar-2018 19:13:01 Europe/Paris] [WAR] 87 (init.php:188) The error received was:
   [03-Mar-2018 19:13:01 Europe/Paris] [WAR] 87 (init.php:188) mysqli error: [2002: No such file or directory] in         CONNECT(localhost, 'sio57_maha10', '****', sio57_maha10)
[03-Mar-2018 19:13:01 Europe/Paris] Call stack (most recent first):
[03-Mar-2018 19:13:01 Europe/Paris] * require() at /home/sio57/mahara.sio57.info/mahara/lib/cron.php:17

I ve test with a little script http://mahara.sio57.info/mahara/test-connexion.php

the connexion is ok.

what's can it be now ;-(

i ve tested with this line commented and uncommented in the config.php 

$cfg->wwwroot = 'http://mahara.sio57.info/mahara/';

can i give you access to my site and file manager to make mymahara on ? (sending by mail)

Thanks you for your help

 

 

 

15 results