PHP / database error after restoring/migrating a Moodle backup 3.6.2

Re: PHP / database error after restoring/migrating a Moodle backup 3.6.2

by Ken Task -
Number of replies: 2
Picture of Particularly helpful Moodlers

However one does this:

mysql> select * from mdl_config where name = 'version';

in Postgres ... do it.

The fix might very simple ... put data in that column of the mdl_config table.

'Tedious installing' .. maybe y'all need to look into using git for installs then ... git enabled sites much easier to maintain update and upgrade wise then.

As far as xferring all courses ... moosh can do.   I know that for a fact.

'spirit of sharing', Ken


In reply to Ken Task

Re: PHP / database error after restoring/migrating a Moodle backup 3.6.2

by Walter J -

Hi, I'm having the same issue after migrating our moodle to a newer server version, We do this before upgrading moodle to have newer packages version on the server.

We followed the steps here to migrate: https://docs.moodle.org/24/en/Moodle_migration#Migrating_a_complete_Moodle_site_-_method_2

The output of version.php and that line in database are the same:

/var/www/moodle# fgrep '$version' version.php
$version  = 2012120305.07;              // 20121203      = branching date YYYYMMDD - do not modify!
postgres=# \c moodle
You are now connected to database "moodle" as user "postgres".
moodle=# select * from mdl_config where name='version';
 id  |  name   |     value
-----+---------+---------------
 180 | version | 2012120305.07
(1 row)

What should we do about this?

In reply to Walter J

Re: PHP / database error after restoring/migrating a Moodle backup 3.6.2

by Walter J -
Solved, was a permissions issue on the destination database. Solved it with:

grant select on all tables in schema public to tsti;