Forums | Mahara Community
Support
/
upgrading from 15.04 to 16.10 problems
16 June 2017, 3:56
Hello
I am trying to set up a test instance of Mahara to 'dry-run' our production upgrade. Our production is running 15.04 on postgres 8.4.20. We have successfully copied the data to test and can see the data in 15.04, but when we ran the upgrade, we found that there is a function, 'left()', which is not supported before postgres 9.1. We upgraded postgres to 9.6, imported the data and changed the wwwroot variable to reflect the change in hostname. When we run the upgrade now, we get a failure at the core upgrade stage. As a new user I can't post urls so I have attempted to post the relevant part of the error log which is repeated many times:
[Thu Jun 15 15:54:51 2017] [error] [client 137.43.64.36] [WAR] 02 (artefact/lib.php:326) strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone., referer: <url removed>
[Thu Jun 15 15:54:51 2017] [error] [client 137.43.64.36] Call stack (most recent first):, referer:<url removed>
[Thu Jun 15 15:54:51 2017] [error] [client 137.43.64.36] * log_message("strtotime(): It is not safe to rely on the system'...", 8, true, true, "/var/www/html/artefact/lib.php", 326) at /var/www/html/lib/errors.php:521, referer:<url removed>
[Thu Jun 15 15:54:51 2017] [error] [client 137.43.64.36] * error(2, "strtotime(): It is not safe to rely on the system'...", "/var/www/html/artefact/lib.php", 326, array(size 6)) at Unknown:0, referer:<url removed>
[Thu Jun 15 15:54:51 2017] [error] [client 137.43.64.36] * strtotime("2013-11-28 19:01:03") at /var/www/html/artefact/lib.php:326, referer:<url removed>
[Thu Jun 15 15:54:51 2017] [error] [client 137.43.64.36] * ArtefactType->__construct("11299", null) at /var/www/html/artefact/comment/lib.php:188, referer:<url removed>
[Thu Jun 15 15:54:51 2017] [error] [client 137.43.64.36] * ArtefactTypeComment->__construct("11299") at /var/www/html/artefact/comment/db/upgrade.php:199, referer:<url removed>
[Thu Jun 15 15:54:51 2017] [error] [client 137.43.64.36] * xmldb_artefact_comment_upgrade("2013072400") at /var/www/html/lib/upgrade.php:423, referer:<url removed>
[Thu Jun 15 15:54:51 2017] [error] [client 137.43.64.36] * upgrade_plugin(object(stdClass)) at /var/www/html/lib/db/upgrade.php:4215, referer:<url removed>
[Thu Jun 15 15:54:51 2017] [error] [client 137.43.64.36] * xmldb_core_upgrade("2015030414") at /var/www/html/lib/upgrade.php:347, referer:<url removed>
[Thu Jun 15 15:54:51 2017] [error] [client 137.43.64.36] * upgrade_core(object(stdClass)) at /var/www/html/admin/upgrade.json.php:87, referer:<url removed>
[Thu Jun 15 15:54:51 2017] [error] [client 137.43.64.36] , referer:<url removed>
I have set the date.timezone in php.ini (or at least in the version I assume to be in use!).
Any thoughts?
Thanks
David
16 June 2017, 9:53
Hi David,
According to https://mahara.org/interaction/forum/topic.php?id=7535#post30396 setting it in php.ini should work.
If it is not working you can set the timezone in Mahara itself in you config.php file like so:
$cfg->dbtimezone = 'America/New_York';
The timezones listed at http://php.net/manual/en/timezones.php should be fine to use.
Cheers
Robert
16 June 2017, 23:21
Hi Robert
Thanks for your reply, I have figured out that I edited the wrong php.ini, I edited the correct one and it looks like I got a successful upgrade of sorts (I am new to PHP and Postgres, most of my experience has been with Java/Tomcat/Oracle). I now have errors about missing plugins, so I will attempt to resolve these, reset the DB and run the upgrade again.
Thanks
David
17 June 2017, 1:59
Hi Robert
I added the plugins and appear to have a completed upgrade. I did encounter one problem with the Learning artefact and it was resolved in the same way as the Cloud Plugin - mahara.org/interaction/forum/topic.php?id=7269 (you might need to put https in front of that link, as I can't post urls yet) i.e. change
class PluginArtefactLearning extends Plugin
to
class PluginArtefactLearning extends PluginArtefact
in /artefact/learning/lib.php
Thanks
David
20 June 2017, 8:47
Hi David,
Thanks for sharing the results of your upgrade. Please feel free to do a pull request on the plugins and fix the issues in there if Gregor hasn't already done so.
Cheers
Kristina
P.S. You can now post links as you are not on spam probation anymore. :-)