Forums | Mahara Community
Support
/
Upgrade db
04 April 2018, 0:15
Hi guys I had a failed upgrade in feb 2017.
I never had time to try and fix.
I have just ran the latest upgrade but am getting ......
[DBG] bb (admin/upgrade.php:91) Not upgrading; unfinished upgrade from 2017/02/25 02:00 still in progress
then
An upgrade began at 2017/02/25 02:00 and did not complete. Run this upgrade anyway.
When I try and do the run this upgrade anyway it directs me to
/admin/upgrade.php?rerun=1
but hen I get
You do not have access to this functionality. Please provide the value for "urlsecret" from your config.php file as part of the URL.
How can I append the secret to the rerun url?
Thanks
Ben
04 April 2018, 10:41
Hi Ben,
to append the urlsecret you just have to add it as a parameter in the url /admin/upgrade.php?rerun=1
for example, if in your config.php file you have
$cfg->urlsecret = 'mysecret'
then the url to rerun would be
/admin/upgrade.php?rerun=1&urlsecret=mysecret
Cheers,
Cecilia
04 April 2018, 10:49
Thank you that worked but then failed to upgrade.
COMPONENT OR PLUGIN | FROM VERSION | TO VERSION | INFORMATION |
---|---|---|---|
core | 16.10.2 | 17.10.3 | Failed to upgrade. |
Any ideas?
Thanks
Ben
04 April 2018, 14:01
Hi Ben,
It is really hard to know from that message only. Do you have the error logs enabled? They will show more information about the issue with the upgrade.
If you don't have them enable already, try adding the following line to the config.php file:
$cfg->productionmode = false;
and try to do the upgrade again. You should see more information about the problem.
Cheers,
Cecilia
04 April 2018, 14:10
I added the line and turned on PHP-FPM site now gives me this
FROM "peo_event_log"
WHERE event = 'createuser'
AND POSITION(',"password":"",' IN data) = 0
")Command was: SELECT event, data, time
FROM "peo_event_log"
WHERE event = ?
AND POSITION(',"password":"",' IN data) = 0
and values was (0:createuser)
- log_message("Failed to get a recordset: mysqli error: [1054: Un...", 8, true, true) at /home/myschool/public_html/lib/errors.php:95
- log_warn("Failed to get a recordset: mysqli error: [1054: Un...") at /home/myschool/public_html/lib/errors.php:859
- SQLException->__construct("Failed to get a recordset: mysqli error: [1054: Un...") at /home/myschool/public_html/lib/dml.php:517
- get_recordset_sql("SELECT event, data, time ...", array(size 1), "", "") at /home/myschool/public_html/lib/dml.php:714
- get_records_sql_array("SELECT event, data, time ...", array(size 1)) at /home/myschool/public_html/lib/db/upgrade.php:4986
- xmldb_core_upgrade("2016090213") at /home/myschool/public_html/lib/upgrade.php:347
- upgrade_core(object(stdClass)) at /home/myschool/public_html/admin/upgrade.json.php:87
Is that helpful?
Thanks again..
Ben
17 April 2018, 9:48
Hi Ben,
Because your upgrade failed part way some things that the upgrade expects have now changed. It is expecting the 'time' column in 'event_log' table to exist. But it has changed to 'ctime' (I suspect).
To avoid this issue you can make a change in the htdocs/lib/db/upgrade.php file on line 4982 from
SELECT event, data, time
to
SELECT event, data, ctime
to get past that point
Cheers
Robert