Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Eduardo Gutiérrez -
Number of replies: 36
Hi i have upgraded from moodle 3.9 to 4.2, and i face that after installing moodle, i have this message:

Error al leer la base de datos. Its quite self explanatory but in English Error reading database.

Im Ubuntu 22.04, postgres 14.7, Apache/2.4.52 (Ubuntu), php 8.1.2

I also havent found and updated installlation tutorial to install moodle with php 8.1 and postgres in ubuntu 22.04.

Note that i had previously installed moodle and working fine, so i have the directories, database. etc created. The problem was using php8.1 when ubuntu upgraded from 7.4 to 8.1 in ubuntu 22.04) ubuntu 20.04 was php 7.4 the default version=

Thanks and every suggestion is welcome.

Sorry for my bad english
Average of ratings: -
In reply to Eduardo Gutiérrez

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Ken Task -
Picture of Particularly helpful Moodlers
Ahhhh ... when your Moodle was 3.9.x, you didn't Check Environment and update component ... then select 4.2 in the moodle drop down list to see what other things you would have to do before upgrading to 4.2! sad

According to:
https://moodledev.io/general/releases/4.2

Server requirements

These are just the minimum supported versions. We recommend keeping all of your software and operating systems up-to-date.

    Moodle upgrade: Moodle 3.11.8 or later


meaning one can upgrade from 3.11.8 or later to 4.2, but not from 3.9.x.

PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too. See PHP for details.

https://moodledev.io/general/development/policies/php

So I hope you made a backup of your site when it was a 3.9.x and can recall what version of PHP you were running at the time.

If you restore the 3.9 site you also have to revert back to php 7.4.x cause 3.9 supposedly will not run with PHP 8.0 or 8.1.



'SoS', Ken

In reply to Ken Task

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Eduardo Gutiérrez -
Yes, i was wrong, but for now i have to install moodle 4.2 with php 8.1 in ubuntu, and following the steps i arrvie to Read error in database.

We need and updated verion of th e tutorial installation for ubuntu 22.04, I need to use again moodle

Thanks
In reply to Eduardo Gutiérrez

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
My guess would be that you didn't install all the necessary extensions in php - specifically the extension that talks to your database. I don't use PostGres so not sure what exactly you need...
In reply to Emma Richardson

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Eduardo Gutiérrez -
In previous versions it worked, so it has to be something new with php8.1..but i cant find any tutorial as official installation tutorial is stuck in moodle 4.0 with php7.4:
https://docs.moodle.org/402/en/Step-by-step_Installation_Guide_for_Ubuntu

I cant find any updated tutorial for ubuntu 22.04 php 8.1( and all the extensions needed) and postgres
In reply to Eduardo Gutiérrez

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Ken Task -
Picture of Particularly helpful Moodlers
Confused ... so you tried to upgrade from 3.9.x to 4.2 and that failed. And now we say we are 'stuck' in 4.0 with PHP 7.4?   Are we still trying to upgrade the 3.9.x?

Moodle 4.0.x will run under 7.4.
Moodle 4.1.x will run under 7.4.
Moodle 4.2 has the requirement for min. 8.0 of PHP.

See chart:

Can't offer very accurate info if we don't know where you are and how you got there!

Do have question for you ... before you began, did you make a site backup of your 3.9.x - archive of code directory and a DB dump of the database?

'SoS', Ken

In reply to Ken Task

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Eduardo Gutiérrez -
No sorry for my bad english, my problem is that i upgraded from ubuntu 20.04 to 22.04 when i was using normally moodle 3.9.

The problem is that i didnt know that ubuntu 22.04 was coming with php8.1 ( ubuntu 20.04 were using php7.4) and moodle was not compatible with php8.1, so my moodle stopped to work.
In some way upgrade my ubuntu had an unexpected for me collateral problem: moodle stopped to work.

Then i tried to upgrade from moodle 3.9 to 4.0...but i have to wait till 4.2 when moodle is compatible with php8.1

So now im trying to install moodle 4.2, with php 8.1 and postgres 14 as written in posts above, that is the default configuration that ubuntu 22.04 brings.
In reply to Eduardo Gutiérrez

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Ken Task -
Picture of Particularly helpful Moodlers

What version of code do you have in document root of apache?
The file version.php will tell you.

And repeat ... did you take a full site backup prior to any/all of this?

What is so compelling about 4.2 that you must have?

Reason asked: 4.1 is long term support ... and will run under php 7.4.

And there is (supposedly) a path to upgrade from your 3.9.x directly to 4.1.highest since they are both long term support as long as the DB is supported.

'SoS', Ken

In reply to Ken Task

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Eduardo Gutiérrez -
I didnt take a copy or backup of the full site.
I was working fine with moodle and decided to upgrade from ubuntu 20.04 to 22.04.3...when ubuntu was mature enouth and stable. But as said before didnt notice that ubuntu 22.04 comes with php8.1 and ubuntu 20.04 with php7.1. Then in that time moodle stopped to work. After some googleing i noticed that moodle wasnt compatible with php8.1

So i had to wait till version 4.2 when seems that moodle is compatible finally with php8.1.

So tried to upgrade to version 4.2...but i didnt have luck.

So for now i think id not be able to upgrade, and try to install the new version. But in the last page, when i made all the config and generate config.php and enter in the moodle main site, i got the error in the title of the post.

So i cant find a tutorial to install in ubuntu 22.04 which comes with+ php8.1 + postgres14+ apache 2.17

Another person posted that perhaps im missing some php extensions ( so again i didint find any place were it appears the list of extensions needed with php8.1). If the extensions are the same, then probably i have other problem, because i upgraded my php from 7.4 to 8.1 with all packages that i had.

Sorry for my bad english

Summarizing how to install moodle 4.4 with ubuntu 22.04 and postgres.
In reply to Eduardo Gutiérrez

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I'm sure you actually meant Moodle 4.2 with Ubuntu 22.04 and PostgreSQL.
This might help you get what you need, done.

https://tecadmin.net/how-to-install-php-on-ubuntu-22-04/

Using the directions in the above line, I added PHP7.4, PHP8.0, and PHP 8.1 to my Ubuntu 22.04 LTS.

I use WinSCP and Putty, but use whatever you normally do to gain access to your server.

In WinSCP navigate to the server Nginx settings: /etc/nginx/sites-available/default

Duplicate line 63. Your line number may be different, so look for the same line of code:

    63        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
    64        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;

Comment out line 63 and change line 64, so the 7.4 becomes 8.0.

    63        #fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
    64        fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;

Save your changes and they should automatically be reflected in the sites-enabled default file.

In a terminal window, restart PHP and nginx.

    sudo systemctl restart php8.0-fpm
    sudo service nginx restart

In Moodle, go to Site administration > Server > Environment and verify that you can upgrade to Moodle 4.1.

To install Moodle 4.2 using PHP 8.1, repeat the above just using 8.1 in line 64 and also changing the restart to use 8.1.
In reply to Eduardo Gutiérrez

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
You see where trial-and-error leads to!
big grin

You'll arrive safer if you plan your route first, for example with the help of this chart: http://www.syndrega.ch/blog/#php-and-dbms-compatibility-of-major-moodle-releases which Ken already brought up.
In reply to Visvanath Ratnaweera

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Eduardo Gutiérrez -
Thanks but as said before with ubuntu 22.04 i have all the requriments for moodle 4.2: postgres 14, php8.1 and apache 2.17...as far as i know.
In reply to Eduardo Gutiérrez

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Ken Task -
Picture of Particularly helpful Moodlers
Truth in attempting to assist you:
I do not run Ubuntu.   So all if have done here is found references to that platform and attempted to explain for you.

But first, an IMPORTANT questions ... which could change some things below.
DO ANSWER THE QUESTIONS!
Do you still have the old moodle 3.9 code on your server?

If so, what does config.php at code root have for the DB array variables:
DB type, DB host, DB user, DB password, DB collation?


Postgres

https://hasura.io/blog/top-psql-commands-and-flags-you-need-to-know-postgresql/

Can you connect to the DB server via psql client and see a moodle database there?

Multiple PHP versions are possible on your server.  I think that's a better option for your server, but you decide.

Sent a link that described how to set that up.
https://techvblogs.com/blog/install-multiple-php-versions-on-ubuntu-22-04

The moodle docs at:
https://docs.moodle.org/402/en/Step-by-step_Installation_Guide_for_Ubuntu

IF you had a higher version of PHP installed only:
Step 3: Install Additional Software
all one would need to do is change the version numbers.

Currently they say:
sudo apt install graphviz aspell ghostscript clamav php7.4-pspell php7.4-curl php7.4-gd php7.4-intl php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-ldap php7.4-zip php7.4-soap php7.4-mbstring

So you could skip graphviz aspell ghostscript clamav and concentrate on
the vision of PHP.

To run 4.2: https://moodledev.io/general/releases/4.2
doc says:
PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too. See PHP for details.
PHP extension sodium is required. See Environment - PHP extension sodium.
PHP extension exif is recommended.

So to be on the safe side, I'd try 8.0 first

sudo apt install php8.0-pspell php8.0-curl php8.0-gd php8.0-intl php8.0-pgsql php8.0-xml php8.0-xmlrpc php8.0-ldap php8.0-zip php8.0-soap php8.0-mbstring

Note the DB extension: php8.0-pgsql (other than version number) is the only thing that has changed from docs that show mysql and you say you need postgres.

One more comment ... please don't apologize for language - you've already done that once!   You are doing just fine.  Can appreciate how difficult it is to communicate in another language having lived in Japan and in France many years ago! smile

Let's really focus on the issue and try and sort this out. smile

'SoS', Ken


Average of ratings: Useful (1)
In reply to Ken Task

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Eduardo Gutiérrez -
Im trying to do my best to answer questions:

1 - Do you still have the old moodle 3.9 code on your server?
Dont really know, i think no. I was using moodle 3.9 normally in ubuntu 20.4... When ubuntu 22.04 was mature enough, in release 22.04.3 i decided to upgrade....and made the upgrade.
So when i tried to use moodle it didnt work anymore.
My googleing told that ubuntu 22.04 was coming with php8.1 and moodel but that time didnt support php8.1... So some mates here in the forum told me to wait till moodle was compatible with 8.1.

When moodle released 4.2 and in changelog show that finally  it was compatible with php8.1 i tried again to upgrade but nothing happens....

So i downloaded the moodle.tar.gz from downloads section, uncompress and follow instructions to install moodle

My config.php generated:

<?php  // Moodle configuration file

unset($CFG);
global $CFG;
$CFG = new stdClass();

$CFG->dbtype    = 'pgsql';
$CFG->dblibrary = 'native';
$CFG->dbhost    = 'localhost';
$CFG->dbname    = 'moodle';
$CFG->dbuser    = 'egutierrez';
$CFG->dbpass    = '@Eutiquio1';
$CFG->prefix    = 'mdl_';
$CFG->dboptions = array (
  'dbpersist' => 0,
  'dbport' => 5434,
  'dbsocket' => '',
);

$CFG->wwwroot   = 'http://localhost:8080/moodle';
$CFG->dataroot  = '/var/www/moodledata';
$CFG->admin     = 'admin';

$CFG->directorypermissions = 0777;

require_once(__DIR__ . '/lib/setup.php');

// There is no php closing tag in this file,
// it is intentional because it prevents trailing whitespace problems!


2 - In my computer i only have php8.1 not other versions...

3 - about php-exif:
eduardo@MiPcLinux:~$ sudo apt install php8.1-exif
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias... Hecho
Leyendo la información de estado... Hecho
Nota, seleccionando «php8.1-common» en lugar de «php8.1-exif»
php8.1-common ya está en su versión más reciente (8.1.2-1ubuntu2.11).
0 actualizados, 0 nuevos se instalarán, 0 para eliminar y 0 no actualizados.

4 - about php-psql

eduardo@MiPcLinux:~$ sudo apt install php8.1-pgsql
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias... Hecho
Leyendo la información de estado... Hecho
php8.1-pgsql ya está en su versión más reciente (8.1.2-1ubuntu2.11).
fijado php8.1-pgsql como instalado manualmente.
0 actualizados, 0 nuevos se instalarán, 0 para eliminar y 0 no actualizados.

5 - Other php extensions:
eduardo@MiPcLinux:~$ sudo apt install graphviz aspell ghostscript clamav php8.1-pspell php8.1-curl php8.1-gd php8.1-intl php8.1-mysql php8.1-xml php8.1-xmlrpc php8.1-ldap php8.1-zip php8.1-soap php8.1-mbstring
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias... Hecho
Leyendo la información de estado... Hecho
aspell ya está en su versión más reciente (0.60.8-4build1).
graphviz ya está en su versión más reciente (2.42.2-6).
php8.1-xmlrpc ya está en su versión más reciente (3:1.0.0~rc3-2).
clamav ya está en su versión más reciente (0.103.8+dfsg-0ubuntu0.22.04.1).
ghostscript ya está en su versión más reciente (9.55.0~dfsg1-0ubuntu5.2).
fijado ghostscript como instalado manualmente.
php8.1-curl ya está en su versión más reciente (8.1.2-1ubuntu2.11).
php8.1-gd ya está en su versión más reciente (8.1.2-1ubuntu2.11).
php8.1-ldap ya está en su versión más reciente (8.1.2-1ubuntu2.11).
fijado php8.1-ldap como instalado manualmente.
php8.1-mbstring ya está en su versión más reciente (8.1.2-1ubuntu2.11).
php8.1-mysql ya está en su versión más reciente (8.1.2-1ubuntu2.11).
php8.1-pspell ya está en su versión más reciente (8.1.2-1ubuntu2.11).
fijado php8.1-pspell como instalado manualmente.
php8.1-xml ya está en su versión más reciente (8.1.2-1ubuntu2.11).
php8.1-intl ya está en su versión más reciente (8.1.2-1ubuntu2.11).
fijado php8.1-intl como instalado manualmente.
php8.1-soap ya está en su versión más reciente (8.1.2-1ubuntu2.11).
fijado php8.1-soap como instalado manualmente.
php8.1-zip ya está en su versión más reciente (8.1.2-1ubuntu2.11).
fijado php8.1-zip como instalado manualmente.
0 actualizados, 0 nuevos se instalarán, 0 para eliminar y 0 no actualizados.

Think it would be clearer...

In reply to Eduardo Gutiérrez

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
1. Please remove the password info from the post and you will need to change that when you do get this back online.
2. You have this running on localhost? No external access? Or are you just trying to get this running on another computer?

Try moving the config.php to some other directory and then visit your site, it should prompt you to do a new install at which point you can point it to the existing database and moodledata folders. The reason for this is that it might troubleshoot the database connection - if you put the db info in the form and cannot connect to the database at all then you need to go into your db server and my suggestion would be to create a new user and give it full rights to your moodle database. Then try again and report back.
In reply to Emma Richardson

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Eduardo Gutiérrez -
First of all dont worry about password, its a local machine, and in a moodle that doesnt work ;)

This is the reason that i actually not sure if i have a new installation of moodle or the result of an upgrade going wrong....
I download and unzip the latest moodle from here: https://download.moodle.org/releases/latest/
As you said deleted the config.php and entered in a wizard....that i introduce basically the same data i was having working ok ( moodledata folder and connection to my postgres)
So you can see that i can access my database from dbbeaver :
Is in spanish but quite self explanatory...seems that moodle 4.2 cannot create the tables and schema inside my moodle database.
( see attached images)

User egutierrez have all permissions in moodle database.





Attachment Captura desde 2023-05-17 17-59-06.png
Attachment Captura desde 2023-05-17 17-59-34.png
In reply to Eduardo Gutiérrez

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Eduardo Gutiérrez -
Any ideas please...i really need modle at home as i have many backup of courses with activities, documentation, solutions..exams....
In reply to Eduardo Gutiérrez

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Ken Task -
Picture of Particularly helpful Moodlers
Seems like we are going round and round here ... but ...
"I didnt take a copy or backup of the full site."

Big mistake.

Nor do you have course backups. - another big mistake.

You had 3.9.x prior to upgrading the operating system.

But ... according to moodle docs/info to upgrade to 4.2 ...

Moodle upgrade: Moodle 3.11.8 or later
meaning one can upgrade to 4.2.x from 3.11.8 or later to 4.2, but not from 3.9.x - which is what you had.

If you really did follow directions for upgrading, you should have a moodle.old directory.
That should be your 3.9.x version.
cd /path/to/moodle.old/
fgrep '$release' version.php

'SoS', Ken


In reply to Ken Task

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
> Seems like we are going round and round here

Yes, smaller and bigger circles. Bigger ones happen when one doesn't learn from the past, like the Problem upgrading to 3.11.2 eight months ago. As it transpired then, I'm still of the opinion that the OP is best served in the Spanish forum.
In reply to Visvanath Ratnaweera

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Ken Task -
Picture of Particularly helpful Moodlers
Hmmmm ...
According to:
https://moodle.org/mod/forum/discuss.php?d=438299#p1764642

"...tried upgrading to 3.11.10: and also 4.1"

So OP had at least a 3.9.x back then.

Now we know location ....
/var/www/html/moodle

and how installed .....
OP accesses via http (no cert) and "localhost:8080/moodle"

localhost means one can be as insecure as one likes ... don't have to have the
lastest/greatest moodle nor the latest/greatest PHP either because NO ONE from the public internet and reach localhost:8080 on OP's machine.

We could find out what version of code:
cd /var/www/html/moodle
fgrep '$release' version.php

Amazing that OP still doesn't have site backup nor course backups.

And from past discussion + this one, it  defies 'learning from mistakes of the past'.  Thus ..... doomed to repeat in present.

Bottom line (regardless of what one fines in docs etc) is still this:
OP's moodle is seriously broken.  And if OP is not willing to take the advice
given to fix, then no one here in forums can help.

And, even if OP were successful, with localhost, there's the issue of restoring what courses are created in a 4.2 to his production/public facing Moodle IF that production server is  NOT a 4.2 as well.

Oh, well ...
'SoS', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Eduardo Gutiérrez -
I think i posted already and as a mate said i dont have to apologize every post for my bad english. But i think the reason why we repeat some things..

Im a computer teacher of computer science in vocational education.
I had moodle 3.9 with many backup of courses, as long as problems, exercises and different materials.
When i finish a course i make a backup of the course of my institute.
Then i import in my personal home moodle, just in case any problems or just to repeat exercises and exams or materials i had.
I didnt make any copy or backup of moodle thats my fault.
I  didnt want to move to moodle 4.0 till was stable ...the same as ubuntu i was in 20.04 and till 22.04.3 was not released i didnt upgrade.
I have many things in ubuntu 22.04 so going backward or install pnp7.4 is not a good solution for me..

So i use localhost:8080, dont mind about security as my computer its only used by me...

So when i upgraded to ubuntu 22.04 moodle stop working....after many googleing i noticed that moodle was compatible with php74 and ubuntu came with 8.1
Then i had to wait till moodel supported php81

Seems that probably from 4.1.2 and now with 4.2 moodle supports php8.1

Then i tried to upgrade but didnt work

So by now im downloading the moodle from 4.2 and install from scratch...
So i had only two or three steps in installation: language, database connection parameters and data and then generate my config-php file....when i go to localhost:8080/moodle it comes error Error reading database

As far as i know i have tried and put here everything im told to, im the first peron interested in solve this problem or bug.

By now i dont think its an upgrading problem, because i gave up the upgrading. its that i cant install moodle 4.2 in ubuntu 22.04 with postgres + php81 and theres no tutorial or guide, because all ive read refers to php7.4

Here screenshot step by step de my installation process, ending with the error ( i think its quite self explanatory step1 is the firs step, step2 the second and so on...=



Thanks
In reply to Eduardo Gutiérrez

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Just because a new install of Ubuntu 22.04 come with only PHP v8.1, does not mean you cannot install and use another version. If you look at my other post up above, I provided a link that explains how to add other PHP versions.

I then provided directions on how use whichever version you want to use. No need to wait on Moodle.
In reply to AL Rachels

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Eduardo Gutiérrez -
Well i have other software installed and dont want to break anything else...

Right now moodle 4.2 supports php8.1 and its no need to modify or made changes in php.

If theres a problem or bug, should be fixed as ubuntu is a general purpose worlwide linux distribution and almost an standard...so moodel should work fine and easy with my setup.

( as it was till these changes already commented)
In reply to Eduardo Gutiérrez

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Ken Task -
Picture of Particularly helpful Moodlers
Initial posting that started this thread:

You posted:
"every suggestion is welcome"
"i have upgraded from moodle 3.9 to 4.2"


1st mistake was upgrading the ubuntu without knowing the version of PHP that would have.

Second mistake@
https://moodledev.io/general/releases/4.2

says under:

*Server requirements
*Moodle upgrade: Moodle 3.11.8 or later

Translation ... one can upgrade to 4.2 from 3.11.8 or later and you had 3.9.x at the time.

Third mistake .... still not understanding:
"Then i tried to upgrade from moodle 3.9 to 4.0"
SEE * likes above.


You followed:
https://docs.moodle.org/402/en/Step-by-step_Installation_Guide_for_Ubuntu
for installing ... well, that's not directions for upgrading which is what I thought
this thread was all about!!!
Here are upgrade docs:
https://docs.moodle.org/402/en/Upgrading
Section of above link:
https://docs.moodle.org/402/en/Upgrading#Moodle_3.9.2C_3.10.2C_3.11.2C_4.0_and_4.1_upgrading_notes
You should read .... assuming you can find out what version of code you begin with!!

You use your local install to restore courses you have downloaded from your entities moodle where the real courses are taught.   So by proxy you do have at least course backups you can created and download to localhost.

BTW, if you uncompress those MBZ file to a work directory and then check the
moodle_backup.xml file contained therein you will see the version of Moodle
your entity is using - is that 4.2?

I've asked for you to check to see if you have still a moodle.old directory somewhere on your system.  No reply to that.

You can be as stubborn as you like ... you can complain all you like ... docs are wrong or there should be a tutorial for or docs need to be upgraded ... etc. etc.
THE BOTTOM LINE IS .... YOUR MOODLE IS BROKEN.

It could be fixed but by now only you know what is where ... I certainly cannot follow ... and that's NOT a language barrier ... you can 'explain' by providing text from Linux commands.

the old code ... the 3.9 ... is it still in existance on your system?
the moodle code is where?
what repositories do you have installed?

'SoS', Ken


In reply to Ken Task

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
I already said this twice: here and here, "The OP is best served in the Spanish forum." The Spanish community is very active and second to none. And they have what we lack - they understand Spanish. You know the German proverb: Es kommt mir Spanisch vor!
smile

In reply to Ken Task

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Eduardo Gutiérrez -
Yes you are right my moodle is broken thats the reason that i began an installation of 4.2. I tried to upgrade but failed and now im in other situation: intall a moodle which works in my ubuntu 22.04

You can see the steps made in the link to google drive.

It should end with a working installlation of moodle in my ubuntu 22.04. But i got the error Read error in database.

I downloaded moodle from downloads page, unzip and began the wizard.

So or i made something wrong, or is some kind bug error with moodle 4.2 in ubuntu 22.04, php 81 and postgres.

Thanks
In reply to Eduardo Gutiérrez

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
What did you do with your existing moodle folder that was there before the upgrade? Did you move it or delete it before you downloaded the new version or did you just copy the new one over the old one? (If so, you need to rename that folder to moodle.old and then redownload the new version and start again).

I don't see where you have the pgsql extension installed - this could be your only issue. Without that extension, moodle cannot talk to your dattabse...

apt-install php8.1-pgsql
In reply to Emma Richardson

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Eduardo Gutiérrez -

Thansk for your help...

I got different moodle folders called moodle.backup and moodle.backup2 ... But i install in moodle folder.

About php-phsql ( i already got it installed):

eduardo@MiPcLinux:~$ sudo apt install php8.1-pgsql
[sudo] contraseña para eduardo:
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias... Hecho
Leyendo la información de estado... Hecho
php8.1-pgsql ya está en su versión más reciente (8.1.2-1ubuntu2.11).
0 actualizados, 0 nuevos se instalarán, 0 para eliminar y 0 no actualizados.
eduardo@MiPcLinux:~$

In reply to Eduardo Gutiérrez

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Eduardo Gutiérrez -
Finally i did it....the problem is in installing wizard i select /var/www/moodledata to store information and data...i thought it was cleaned in installation wizard....but i noticed it had folders and files inside....so i delete all the content of the folder /var/www/moodledata and began an installation....and worked...

So perhaps its a bug, or something to improve , in installation wizard when someone selects a folder for moodledata, then before creating files or folders, delete them and assure that your moodledata is correct and compatible with moodle in process of being installed

Thanks for all that helped
In reply to Eduardo Gutiérrez

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
So you just deleted all your data?
In reply to Emma Richardson

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Eduardo Gutiérrez -
I think so, but i havent found any other options to re-use moodle data...I was always stuck after config wizard....in error reading database....
In reply to Eduardo Gutiérrez

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
I thought you wanted your courses back - that was what you just deleted...
In reply to Eduardo Gutiérrez

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Ken Task -
Picture of Particularly helpful Moodlers
In both of those: moodle.backup and moodle.backup2, there should be present a version.php file and a config.php file.

In both backup directories, issue:
fgrep '$release' version.php
cat config.php | grep 'db'

Let's remember one of your mistakes was trying to upgrade to 4.2 without the necessary version hop in between.

Directions you are following said to copy the config.php file from the backup directory into the new code directory.

And Emma is right on ... you erased all the data that site had by deleting moodledata.

To others reading this ... don't do that when updating or upgrading a site (properly)!  If you do, you will loose all the content of the site and with no backup of moodledata, one is cooked!  :\

Normally ... updates/upgrades only touch code and the DB - if version for PHP + extensions is compat with destination version of Moodle.   The only thing in moodledata that could affect an update or upgrade is what is in the moodledata/cache/ directories.   Matter of fact, that is normally the last step in one updating or upgrading ... clear the cache related directories.

'SoS', Ken

In reply to Ken Task

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Eduardo Gutiérrez -
moodle.backup:

eduardo@MiPcLinux:/var/www/html/moodle.backup$ fgrep '$release' version.php
$release = '3.11.2+ (Build: 20210902)';// Human-friendly version name
eduardo@MiPcLinux:/var/www/html/moodle.backup$ cat config.php | grep 'db'
$CFG->dbtype = 'pgsql';
$CFG->dblibrary = 'native';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle';
$CFG->dbuser = 'egutierrez';
$CFG->dbpass = '@Eutiquio1';
$CFG->dboptions = array (
'dbpersist' => 0,
'dbport' => 5432,
'dbsocket' => '',
eduardo@MiPcLinux:/var/www/html/moodle.backup$


moodle.backup2
eduardo@MiPcLinux:/var/www/html/moodle.backup$ fgrep '$release' version.php
$release = '3.11.2+ (Build: 20210902)';// Human-friendly version name
eduardo@MiPcLinux:/var/www/html/moodle.backup$ cat config.php | grep 'db'
$CFG->dbtype = 'pgsql';
$CFG->dblibrary = 'native';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle';
$CFG->dbuser = 'egutierrez';
$CFG->dbpass = '@Eutiquio1';
$CFG->dboptions = array (
'dbpersist' => 0,
'dbport' => 5432,
'dbsocket' => '',
eduardo@MiPcLinux:/var/www/html/moodle.backup$

moodle.3.11 backup
eduardo@MiPcLinux:/var/www/html/moodle.backup$ fgrep '$release' version.php
$release = '3.11.2+ (Build: 20210902)';// Human-friendly version name
eduardo@MiPcLinux:/var/www/html/moodle.backup$ cat config.php | grep 'db'
$CFG->dbtype = 'pgsql';
$CFG->dblibrary = 'native';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle';
$CFG->dbuser = 'egutierrez';
$CFG->dbpass = '@Eutiquio1';
$CFG->dboptions = array (
'dbpersist' => 0,
'dbport' => 5432,
'dbsocket' => '',
eduardo@MiPcLinux:/var/www/html/moodle.backup$
In reply to Eduardo Gutiérrez

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Ken Task -
Picture of Particularly helpful Moodlers
The 'devils' are in the details!
 
From your posting:

moodle.backup:
prompt shows: eduardo@MiPcLinux:/var/www/html/moodle.backup$

You say it's in moodle.backup2, but ..
prompt shows: eduardo@MiPcLinux:/var/www/html/moodle.backup$

I don't see a moodle.backup2!!!!

What you are seeing is 3.11.x and you started with a 3.9.x (assuming that should have been moodle.backup),

Same directory!

No matter anyway ... what's done is done!

Pardon for being blunt, but ....

Before you upgraded your operating system, one should have checked on requirements for upgrading moodle.   That's documented.   You did not do that.

After you upgraded your OS and discovered that came with php 8.1, not the php 7.4 you had, is when the quest began ... but, here again ... using wrong info ... moodle forums/docs do not and should not cover how to administer a Ubuntu server (any version).   And moodle forums/docs don't officially tell one how to use the package manager in any OS (even though it's mentioned in forms) to *downgrade* php ... which is possible.

Your best resource for administration of your Ubuntu server is Ubuntu!

Ok, you've wipped out all courses you had and you now have a functioning 4.2 without any content.   Going forward for you ... make full course backups from the entity (your institutions) moodle and restore to your 4.2.
After you add any plugins used at the institution site to your local.

Now if your Institutions moodle isn't a 4.2, but a lower version of Moodle, and you attempt to restore your 4.2 backups to the institutions moodle and those fail, that is .... repeat ... THAT IS a matter for your institutions moodle admin and you.   Don't think anyone in these forums will tell your institutions moodle admin person their jobs.

Anyhoo ... this saga/thread can be closed and marked as solved now!  And I hope it serves others as a story about what not to do! (no offense!)

Best of luck ... and do encourage you to learn your OS via original source! smile

'SoS', Ken


In reply to Ken Task

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Eduardo Gutiérrez -
Before you upgraded your operating system, one should have checked on requirements for upgrading moodle. That's documented. You did not do that.

Yes i assume that, thought that ubuntu 22.04 was made for working with most of the software... i didnt expect also that moodle didnt move to php8.1 till now.... But yes was my mistake and the origin of everything....

After you upgraded your OS and discovered that came with php 8.1, not the php 7.4 you had, is when the quest began ... but, here again ... using wrong info ... moodle forums/docs do not and should not cover how to administer a Ubuntu server (any version) ...

Thats correct this was the reason that i waited from 3.11 to 4.2 till moodle was compatible with php8.1
My first intention was to try to upgrade moodle from 3.9/3.11 to 4.2 preserving my information and courses...but i couldnt because of read error database that is the title of the post...So i messed up and decided to install from scratch moodle...

Now when id have some time, by now we had to write down marks and its the final days of courses, id try to restore courses which where copied/backup from different versions of moodle ( every institute its a world=... if im lucky i suppose most of them if not all should work, because definetily there como from prior versions of moodle...I dont know any institution here that have made the jump from 3.X to 4.X

Now if your Institutions moodle isn't a 4.2, but a lower version of Moodle, and you attempt to restore your 4.2 backups to the institutions moodle and those fail, that is .... repeat ... THAT IS a matter for your institutions moodle admin and you. Don't think anyone in these forums will tell your institutions moodle admin person their jobs.

As told before institutions are in 3.X and id restore in my 4.2... in institutions you are not allowed to restore a course in moodle, its something that admins do....so dont be panic hahaha

Anyhoo ... this saga/thread can be closed and marked as solved now! And I hope it serves others as a story about what not to do! (no offense!)
Well i dont think im the only person in the world that made a mistake...and as i told in the post, the wizard installation to work with moodledata can be improved....

Thanks again
In reply to Eduardo Gutiérrez

Re: Moodle 4.2 in ubuntu 22.04: Error al leer de la base de datos

by Ken Task -
Picture of Particularly helpful Moodlers
Well, there is always room for improvement in docs.
Docs are a Wiki and you could edit/change/contribute. smile

One of the questions I asked early on was:
"do you have a site backup?"
You said no.

So, for your future endeavors in being on the 'leading edge' of Moodle,
a bash shell script to backup your site.


call it 'bu' and put it at code root of your site.

echo '4.1.3+ (Build: 20230427)';
tar -cvf /mnt/data/backup/m310/moodle-code-413+-$(date +%Y%m%d%-H%M%S).tar ../moodle310;
tar -cvf /mnt/data/backup/m310/moodle-data-min-413+-$(date +%Y%m%d%-H%M%S).tar /var/www/moodle310data/filedir;
mysqldump -u mdadmin moodle310 > /mnt/data/backup/m310/moodle413+-db-$(date +%Y%m%d%-H%M%S).sql;

You have to adjust the paths and version numbers you see above as well as
create the directory that will hold the site backup.  Obviously, whatever postgres uses for a DB dump also!

Highly recommend you do that now!

Going forward ... since you are on leading/bleeding edge, you should know that moodle releases new code - point releases frequently.  Those point releases include fixes to bugs as well as security.   Granted you won't be interested in security fixes, but the bug fixes you might.

https://moodledev.io/general/releases
For 4.2 the most recent release is 4.2+ - see the '+"?

$release  = '4.2+ (Build: 20230519)'

I just did a git pull on a 4.2. and this is what was updated/changed.

Wow!  Lots!!!

Right now you cannot do this because your code was not installed using git so here is some info on git for admins.

https://docs.moodle.org/402/en/Git_for_Administrators

command I issued in a 4.2 code directory:
git pull [ENTER]

below is output ...

remote: Enumerating objects: 3888, done.
remote: Counting objects: 100% (3888/3888), done.
remote: Compressing objects: 100% (937/937), done.
remote: Total 3888 (delta 2877), reused 3863 (delta 2852), pack-reused 0
Receiving objects: 100% (3888/3888), 1.63 MiB | 2.29 MiB/s, done.
Resolving deltas: 100% (2877/2877), completed with 783 local objects.
From git://git.moodle.org/moodle
   ae4efa96ee8..4781b416316  MOODLE_402_STABLE -> origin/MOODLE_402_STABLE
   9d8ec047be1..f459ae270b1  MOODLE_311_STABLE -> origin/MOODLE_311_STABLE
   b90b0e6a8a3..2fa4da9aa47  MOODLE_39_STABLE  -> origin/MOODLE_39_STABLE
   2caed2991ed..d6707840e09  MOODLE_400_STABLE -> origin/MOODLE_400_STABLE
   b2d07127484..6ca70dd59f2  MOODLE_401_STABLE -> origin/MOODLE_401_STABLE
   4e632b72518..2e1c6fd43e9  master            -> origin/master
Updating ae4efa96ee8..4781b416316
Fast-forward
 .github/workflows/windows.yml                      |  144 ++
 admin/tool/behat/cli/init.php                      |   20 +-
 admin/tool/behat/cli/util.php                      |   13 +-
 admin/tool/behat/cli/util_single_run.php           |    6 +-
 admin/tool/behat/upgrade.txt                       |    2 +
 .../brickfield/classes/local/tool/advanced.php     |   26 +
 admin/tool/brickfield/lang/en/tool_brickfield.php  |    6 +
 admin/tool/brickfield/styles.css                   |  105 +-
 admin/tool/brickfield/templates/advanced.mustache  |  202 +--
 admin/tool/cohortroles/db/upgrade.php              |    3 +
 .../content/moodle/components/moodle-icons.md      |    2 +-
 admin/tool/customlang/db/upgrade.php               |    3 +
 admin/tool/dataprivacy/db/upgrade.php              |    3 +
 admin/tool/licensemanager/classes/helper.php       |   25 +-
 admin/tool/licensemanager/classes/manager.php      |   21 +-
 admin/tool/licensemanager/index.php                |    6 -
 admin/tool/log/db/upgrade.php                      |    3 +
 admin/tool/log/store/database/db/upgrade.php       |    3 +
 admin/tool/log/store/standard/db/upgrade.php       |    3 +
 admin/tool/mobile/db/upgrade.php                   |    3 +
 admin/tool/monitor/db/upgrade.php                  |    3 +
 admin/tool/moodlenet/db/upgrade.php                |    3 +
 .../tool/oauth2/tests/behat/basic_settings.feature |   24 +-
 admin/tool/policy/classes/acceptances_table.php    |    2 +-
 admin/tool/policy/db/upgrade.php                   |    3 +
 admin/tool/usertours/db/upgrade.php                |    3 +
 admin/webservice/tokens.php                        |    1 -
 analytics/tests/manager_test.php                   |   77 +-
 auth/cas/db/upgrade.php                            |    3 +
 auth/db/db/upgrade.php                             |    3 +
 auth/email/db/upgrade.php                          |    3 +
 auth/email/tests/external/external_test.php        |    6 +
 auth/ldap/auth.php                                 |   12 +
 auth/ldap/db/upgrade.php                           |    3 +
 auth/lti/db/upgrade.php                            |    3 +
 auth/manual/db/upgrade.php                         |    3 +
 auth/mnet/auth.php                                 |    3 +
 auth/mnet/db/upgrade.php                           |    3 +
 auth/none/db/upgrade.php                           |    3 +
 auth/oauth2/db/upgrade.php                         |    3 +
 auth/shibboleth/db/upgrade.php                     |    3 +
 .../condition/completion/classes/frontend.php      |    2 +-
 backup/moodle2/backup_course_task.class.php        |    1 +
 backup/moodle2/backup_custom_fields.php            |    2 +
 backup/moodle2/backup_stepslib.php                 |   30 +-
 backup/moodle2/restore_course_task.class.php       |    1 +
 backup/util/ui/renderer.php                        |    8 +
 badges/classes/backpack_api2p1.php                 |   56 +-
 badges/classes/backpack_api2p1_mapping.php         |    6 +
 badges/classes/backpack_api_mapping.php            |    6 +
 badges/classes/badge.php                           |   27 +
 badges/classes/output/external_backpacks_page.php  |    6 +
 badges/classes/output/external_backpacks_table.php |    4 +-
 badges/criteria/award_criteria.php                 |   18 +
 blocks/badges/db/upgrade.php                       |    3 +
 blocks/calendar_month/db/upgrade.php               |    3 +
 blocks/calendar_upcoming/db/upgrade.php            |    3 +
 blocks/completionstatus/db/upgrade.php             |    3 +
 blocks/course_summary/db/upgrade.php               |    3 +
 blocks/feedback/db/upgrade.php                     |    3 +
 blocks/glossary_random/block_glossary_random.php   |    3 +
 .../glossary_random_addblock_disabled.feature      |   22 +-
 blocks/html/db/upgrade.php                         |    3 +
 blocks/moodleblock.class.php                       |    3 -
 blocks/myoverview/classes/output/main.php          |    3 +
 blocks/myoverview/db/upgrade.php                   |    3 +
 blocks/navigation/db/upgrade.php                   |    3 +
 blocks/recent_activity/db/upgrade.php              |    3 +
 blocks/recentlyaccesseditems/db/upgrade.php        |    3 +
 .../recentlyaccesseditems/tests/observer_test.php  |   27 +
 blocks/rss_client/db/upgrade.php                   |    3 +
 blocks/section_links/db/upgrade.php                |    3 +
 blocks/selfcompletion/db/upgrade.php               |    3 +
 blocks/settings/db/upgrade.php                     |    3 +
 blocks/tag_youtube/db/upgrade.php                  |    3 +
 blocks/timeline/db/upgrade.php                     |    3 +
 blog/locallib.php                                  |   63 +
 blog/tests/external/external_test.php              |    3 +
 cache/classes/config.php                           |    6 +
 cache/classes/dummystore.php                       |    8 +
 cache/classes/loaders.php                          |   13 +
 calendar/amd/build/manage_subscriptions.min.js     |  Bin 3927 -> 3913 bytes
 calendar/amd/build/manage_subscriptions.min.js.map |  Bin 7013 -> 7026 bytes
 calendar/amd/src/manage_subscriptions.js           |    2 +-
 calendar/lib.php                                   |   12 +
 calendar/tests/event_factory_test.php              |    8 +-
 comment/lib.php                                    |    2 +
 comment/locallib.php                               |   18 +
 competency/classes/competency.php                  |    3 +
 competency/tests/competency_override_test.php      |   30 +
 competency/tests/external/external_test.php        |    7 +-
 completion/completion_completion.php               |    2 +
 completion/criteria/completion_criteria.php        |    6 +
 completion/data_object.php                         |    3 +
 completion/tests/progress_test.php                 |    4 +-
 course/amd/build/activitychooser.min.js            |  Bin 8707 -> 8763 bytes
 course/amd/build/activitychooser.min.js.map        |  Bin 23360 -> 23556 bytes
 course/amd/src/activitychooser.js                  |   10 +
 .../classes/output/local/content/section.php       |    2 +
 course/format/topics/db/upgrade.php                |    3 +
 .../tests/behat/edit_delete_sections.feature       |    8 +
 course/format/weeks/db/upgrade.php                 |    3 +
 course/renderer.php                                |    2 +-
 enrol/database/db/upgrade.php                      |    3 +
 enrol/flatfile/db/upgrade.php                      |    3 +
 enrol/guest/db/upgrade.php                         |    3 +
 enrol/imsenterprise/db/upgrade.php                 |    3 +
 enrol/ldap/lib.php                                 |    3 +
 enrol/ldap/settingslib.php                         |    3 +
 enrol/lti/db/upgrade.php                           |    3 +
 enrol/lti/ims-blti/OAuth.php                       |    8 +
 enrol/lti/ims-blti/readme_moodle.txt               |    2 +
 enrol/manual/db/upgrade.php                        |    3 +
 enrol/mnet/db/upgrade.php                          |    3 +
 enrol/paypal/db/upgrade.php                        |    3 +
 enrol/renderer.php                                 |    5 +-
 enrol/self/db/upgrade.php                          |    3 +
 favourites/classes/local/entity/favourite.php      |    3 +
 .../local/repository/favourite_repository.php      |    3 +-
 favourites/tests/repository_test.php               |   22 -
 filter/displayh5p/db/upgrade.php                   |    3 +
 filter/displayh5p/tests/behat/h5p_filter.feature   |    5 +
 filter/mathjaxloader/db/upgrade.php                |    3 +
 filter/mediaplugin/db/upgrade.php                  |    3 +
 filter/tex/db/upgrade.php                          |    3 +
 filter/tex/latex.php                               |   32 +-
 filter/tex/pix.php                                 |    2 -
 grade/amd/build/searchwidget/basewidget.min.js     |  Bin 5974 -> 5997 bytes
 grade/amd/build/searchwidget/basewidget.min.js.map |  Bin 14226 -> 14363 bytes
 grade/amd/src/searchwidget/basewidget.js           |    6 +
 grade/classes/external/get_feedback.php            |    2 +-
 grade/grading/form/guide/db/upgrade.php            |    3 +
 grade/grading/form/rubric/db/upgrade.php           |    3 +
 grade/lib.php                                      |    5 +
 .../report/grader/amd/build/feedback_modal.min.js  |  Bin 1828 -> 2009 bytes
 .../grader/amd/build/feedback_modal.min.js.map     |  Bin 4415 -> 4718 bytes
 grade/report/grader/amd/src/feedback_modal.js      |   12 +-
 grade/report/grader/db/upgrade.php                 |    3 +
 grade/report/history/db/upgrade.php                |    3 +
 grade/report/overview/db/upgrade.php               |    3 +
 .../singleview/classes/external/singleview.php     |    3 +-
 .../summary/classes/local/entities/grade_items.php |    3 +-
 grade/report/user/db/upgrade.php                   |    3 +
 install/lang/hi/moodle.php                         |    1 +
 install/lang/ro/install.php                        |    4 +-
 lang/en/admin.php                                  |    2 +-
 lang/en/error.php                                  |    2 +
 lang/en/hub.php                                    |    2 +-
 lib/accesslib.php                                  |    4 +-
 lib/antivirus/clamav/db/upgrade.php                |    3 +
 lib/behat/lib.php                                  |   21 +
 lib/classes/check/performance/stats.php            |   17 +-
 lib/classes/date.php                               |   23 +-
 lib/classes/hub/registration.php                   |    2 +-
 lib/classes/moodlenet/moodlenet_client.php         |   11 +-
 lib/classes/oauth2/discovery/imsbadgeconnect.php   |   10 +
 lib/classes/task/question_stats_cleanup_task.php   |   22 +-
 lib/completionlib.php                              |    4 +-
 lib/db/install.xml                                 |    2 +-
 lib/db/tasks.php                                   |    3 +-
 lib/db/upgrade.php                                 |   12 +
 lib/editor/atto/db/upgrade.php                     |    3 +
 lib/editor/atto/plugins/equation/db/upgrade.php    |    3 +
 lib/editor/atto/plugins/recordrtc/db/upgrade.php   |    3 +
 .../tiny/plugins/equation/amd/build/ui.min.js      |  Bin 6039 -> 6025 bytes
 .../tiny/plugins/equation/amd/build/ui.min.js.map  |  Bin 11793 -> 11806 bytes
 lib/editor/tiny/plugins/equation/amd/src/ui.js     |    2 +-
 lib/editor/tiny/plugins/link/amd/build/link.min.js |  Bin 3695 -> 3942 bytes
 .../tiny/plugins/link/amd/build/link.min.js.map    |  Bin 9566 -> 10572 bytes
 lib/editor/tiny/plugins/link/amd/src/link.js       |   26 +-
 .../tiny/plugins/media/classes/plugininfo.php      |    2 +-
 lib/external/tests/external_api_test.php           |    1 +
 lib/filebrowser/file_info_context_coursecat.php    |   48 +-
 lib/filestorage/tests/file_system_test.php         |    1 +
 lib/filestorage/tests/stored_file_test.php         |    1 +
 lib/fonts/fa-brands-400.ttf                        |  Bin 187448 -> 187208 bytes
 lib/fonts/fa-brands-400.woff2                      |  Bin 108000 -> 108028 bytes
 lib/fonts/fa-regular-400.ttf                       |  Bin 63728 -> 63952 bytes
 lib/fonts/fa-regular-400.woff2                     |  Bin 24840 -> 24948 bytes
 lib/fonts/fa-solid-900.ttf                         |  Bin 394832 -> 394628 bytes
 lib/fonts/fa-solid-900.woff2                       |  Bin 149908 -> 150124 bytes
 lib/fonts/fa-v4compatibility.ttf                   |  Bin 10172 -> 10172 bytes
 lib/fonts/fa-v4compatibility.woff2                 |  Bin 4536 -> 4568 bytes
 lib/grouplib.php                                   |    2 +
 lib/licenselib.php                                 |    5 +-
 lib/phpxmlrpc/Client.php                           | 1590 ++++++++++++++------
 lib/phpxmlrpc/Encoder.php                          |  216 +--
 lib/phpxmlrpc/Exception.php                        |    7 +
 lib/phpxmlrpc/Exception/FaultResponseException.php |   12 +
 lib/phpxmlrpc/Exception/HttpException.php          |    5 +-
 lib/phpxmlrpc/Exception/NoSuchMethodException.php  |    7 +
 lib/phpxmlrpc/Exception/ParsingException.php       |   12 +
 lib/phpxmlrpc/Exception/PhpXmlrpcException.php     |    7 +-
 lib/phpxmlrpc/Exception/ServerException.php        |   12 +
 lib/phpxmlrpc/Exception/StateErrorException.php    |   12 +
 lib/phpxmlrpc/Exception/TransportException.php     |   12 +
 lib/phpxmlrpc/Exception/TypeErrorException.php     |   12 +
 lib/phpxmlrpc/Exception/ValueErrorException.php    |   12 +
 lib/phpxmlrpc/Exception/XmlException.php           |    7 +
 lib/phpxmlrpc/Exception/XmlRpcException.php        |    7 +
 lib/phpxmlrpc/Helper/Charset.php                   |  126 +-
 lib/phpxmlrpc/Helper/Date.php                      |   27 +-
 lib/phpxmlrpc/Helper/Http.php                      |  148 +-
 lib/phpxmlrpc/Helper/Interop.php                   |   42 +
 lib/phpxmlrpc/Helper/Logger.php                    |   59 +-
 lib/phpxmlrpc/Helper/XMLParser.php                 | 1108 +++++++++-----
 lib/phpxmlrpc/PhpXmlRpc.php                        |  271 +++-
 lib/phpxmlrpc/Request.php                          |  516 ++++---
 lib/phpxmlrpc/Response.php                         |  213 ++-
 lib/phpxmlrpc/Server.php                           |  976 ++++++++----
 lib/phpxmlrpc/Traits/CharsetEncoderAware.php       |   27 +
 lib/phpxmlrpc/Traits/DeprecationLogger.php         |   40 +
 lib/phpxmlrpc/Traits/LoggerAware.php               |   27 +
 lib/phpxmlrpc/Traits/ParserAware.php               |   28 +
 lib/phpxmlrpc/Traits/PayloadBearer.php             |   45 +
 lib/phpxmlrpc/Value.php                            |  599 ++++----
 lib/phpxmlrpc/Wrapper.php                          |  668 ++++----
 lib/phpxmlrpc/readme_moodle.txt                    |    2 +-
 lib/questionlib.php                                |   17 +-
 lib/templates/search_input.mustache                |   11 +-
 lib/tests/completionlib_test.php                   |   43 +
 lib/tests/hub/registration_test.php                |    9 +
 lib/thirdpartylibs.xml                             |    4 +-
 login/index.php                                    |    2 +-
 media/player/videojs/classes/plugin.php            |    2 +-
 media/player/videojs/db/upgrade.php                |    3 +
 .../airnotifier/message_output_airnotifier.php     |   17 +-
 message/output/email/db/upgrade.php                |    3 +
 message/output/popup/db/upgrade.php                |    3 +
 message/output/popup/tests/api_test.php            |    3 +
 message/output/popup/tests/externallib_test.php    |    3 +
 mnet/lib.php                                       |   25 +-
 mod/assign/db/upgrade.php                          |    3 +
 mod/assign/feedback/comments/db/upgrade.php        |    3 +
 mod/assign/feedback/editpdf/db/upgrade.php         |    3 +
 mod/assign/feedback/file/db/upgrade.php            |    3 +
 mod/assign/locallib.php                            |   19 +-
 mod/assign/submission/comments/db/upgrade.php      |    3 +
 mod/assign/submission/file/db/upgrade.php          |    3 +
 mod/assign/submission/onlinetext/db/upgrade.php    |    3 +
 mod/bigbluebuttonbn/classes/instance.php           |    2 +-
 mod/bigbluebuttonbn/classes/output/index.php       |   19 +-
 mod/bigbluebuttonbn/db/upgrade.php                 |    3 +
 mod/book/classes/external.php                      |    5 +-
 mod/book/classes/helper.php                        |   44 +
 mod/book/db/upgrade.php                            |    3 +
 .../tests/behat/book_activity_completion.feature   |   29 +
 mod/book/tests/helper_test.php                     |   48 +
 mod/book/view.php                                  |    6 +-
 mod/chat/db/upgrade.php                            |    3 +
 mod/choice/db/upgrade.php                          |    3 +
 mod/data/classes/search/entry.php                  |   28 +-
 mod/data/db/upgrade.php                            |    3 +
 mod/data/tests/search/search_test.php              |   34 +-
 mod/data/view.php                                  |   12 +-
 mod/feedback/db/upgrade.php                        |    3 +
 mod/folder/db/upgrade.php                          |    3 +
 mod/forum/db/upgrade.php                           |    3 +
 mod/forum/templates/discussion_list.mustache       |   22 +-
 mod/glossary/db/upgrade.php                        |    3 +
 mod/h5pactivity/classes/local/attempt.php          |    1 -
 mod/h5pactivity/db/upgrade.php                     |    3 +
 mod/imscp/db/upgrade.php                           |    3 +
 mod/label/db/upgrade.php                           |    3 +
 mod/lesson/db/upgrade.php                          |    3 +
 mod/lti/OAuth.php                                  |    5 +
 mod/lti/classes/local/ltiopenid/jwks_helper.php    |    5 +
 mod/lti/db/upgrade.php                             |    3 +
 mod/lti/service/gradebookservices/db/upgrade.php   |    3 +
 mod/page/db/upgrade.php                            |    3 +
 mod/quiz/accessrule/seb/db/upgrade.php             |    3 +
 mod/quiz/db/upgrade.php                            |    3 +
 mod/quiz/lib.php                                   |   25 +-
 mod/quiz/locallib.php                              |   16 +-
 mod/quiz/report/overview/db/upgrade.php            |    3 +
 mod/quiz/report/statistics/classes/calculated.php  |    6 +-
 mod/quiz/report/statistics/classes/calculator.php  |   28 +-
 mod/quiz/report/statistics/db/upgrade.php          |    3 +
 mod/quiz/report/statistics/report.php              |   32 +-
 mod/quiz/report/statistics/statistics_table.php    |    6 +-
 .../statistics/tests/behat/random_essays.feature   |   38 -
 .../tests/behat/random_questions.feature           |   58 +
 mod/quiz/report/statistics/upgrade.txt             |   12 +
 .../tests/behat/manually_mark_question.feature     |   19 +-
 mod/resource/db/upgrade.php                        |    3 +
 mod/scorm/db/upgrade.php                           |    3 +
 mod/survey/db/upgrade.php                          |    3 +
 mod/url/db/upgrade.php                             |    3 +
 mod/wiki/db/upgrade.php                            |    3 +
 mod/workshop/db/upgrade.php                        |    3 +
 mod/workshop/form/accumulative/db/upgrade.php      |    3 +
 mod/workshop/form/comments/db/upgrade.php          |    3 +
 mod/workshop/form/numerrors/db/upgrade.php         |    3 +
 mod/workshop/form/rubric/db/upgrade.php            |    3 +
 payment/gateway/paypal/db/upgrade.php              |    3 +
 portfolio/googledocs/db/upgrade.php                |    3 +
 portfolio/mahara/lib.php                           |    3 +
 question/bank/deletequestion/delete.php            |    7 +-
 question/bank/exporttoxml/lib.php                  |   46 +
 .../tests/behat/preview_question.feature           |   27 +
 .../classes/question_category_list.php             |    1 +
 question/bank/previewquestion/classes/helper.php   |    9 +-
 .../classes/columns/discrimination_index.php       |   25 +-
 .../classes/columns/discriminative_efficiency.php  |   25 +-
 .../statistics/classes/columns/facility_index.php  |   25 +-
 question/bank/statistics/classes/helper.php        |    2 +-
 .../tests/behat/statistics_values.feature          |    4 +
 question/bank/statistics/tests/helper_test.php     |    6 +
 question/bank/upgrade.txt                          |   10 +
 question/behaviour/manualgraded/db/upgrade.php     |    3 +
 question/classes/local/bank/column_base.php        |   16 +-
 question/classes/local/bank/view.php               |   83 +-
 .../local/statistics/statistics_bulk_loader.php    |  170 +++
 question/classes/question_reference_manager.php    |   77 +
 .../all_calculated_for_qubaid_condition.php        |   28 +-
 question/classes/statistics/responses/analyser.php |   33 +-
 .../responses/analysis_for_actual_response.php     |    5 +-
 .../statistics/responses/analysis_for_class.php    |    6 +-
 .../statistics/responses/analysis_for_question.php |   23 +-
 .../statistics/responses/analysis_for_subpart.php  |    5 +-
 .../tests/question_reference_manager_test.php      |  123 ++
 question/tests/generator/lib.php                   |    8 +-
 .../statistics/statistics_bulk_loader_test.php     |  556 +++++++
 question/tests/version_test.php                    |   29 +-
 question/type/calculated/db/upgrade.php            |    3 +
 question/type/ddmarker/db/upgrade.php              |    3 +
 question/type/essay/db/upgrade.php                 |    3 +
 question/type/match/db/upgrade.php                 |    3 +
 question/type/multianswer/db/upgrade.php           |    3 +
 question/type/multianswer/renderer.php             |    5 +-
 question/type/multichoice/db/upgrade.php           |    3 +
 question/type/multichoice/renderer.php             |    6 +-
 .../type/multichoice/tests/walkthrough_test.php    |    2 +-
 question/type/numerical/db/upgrade.php             |    3 +
 question/type/random/db/upgrade.php                |    3 +
 question/type/randomsamatch/db/upgrade.php         |    3 +
 question/type/shortanswer/db/upgrade.php           |    3 +
 question/type/truefalse/db/upgrade.php             |    3 +
 question/type/truefalse/renderer.php               |    6 +-
 question/type/truefalse/tests/walkthrough_test.php |    2 +-
 question/upgrade.txt                               |   24 +
 rating/tests/externallib_test.php                  |   39 +
 report/competency/classes/output/report.php        |    2 +
 .../classes/table/infectedfiles_table.php          |    4 +
 report/log/user.php                                |    4 -
 report/outline/tests/lib_test.php                  |    1 -
 report/participation/index.php                     |    1 -
 .../tests/report_progress_helper_testcase.php      |    3 +
 .../classes/output/audience_heading_editable.php   |    9 +-
 .../classes/output/column_aggregation_editable.php |    9 +-
 .../classes/output/column_heading_editable.php     |    9 +-
 .../classes/output/filter_heading_editable.php     |   10 +-
 .../classes/output/report_name_editable.php        |    3 +-
 .../classes/output/schedule_name_editable.php      |    9 +-
 repository/dropbox/db/upgrade.php                  |    3 +
 repository/flickr/db/upgrade.php                   |    3 +
 repository/googledocs/db/upgrade.php               |    3 +
 repository/onedrive/db/upgrade.php                 |    3 +
 search/classes/base.php                            |    7 +
 search/classes/base_activity.php                   |    3 +
 search/engine/simpledb/db/upgrade.php              |    3 +
 .../simpledb/tests/privacy/provider_test.php       |   27 +
 search/tests/fixtures/mock_search_engine.php       |    3 +
 tag/classes/tag.php                                |   12 +
 theme/boost/amd/build/form-display-errors.min.js   |  Bin 2207 -> 2216 bytes
 .../boost/amd/build/form-display-errors.min.js.map |  Bin 7744 -> 7768 bytes
 theme/boost/amd/src/form-display-errors.js         |    2 +-
 theme/boost/scss/fontawesome/brands.scss           |    2 +-
 theme/boost/scss/fontawesome/fontawesome.scss      |    2 +-
 theme/boost/scss/fontawesome/readme_moodle.txt     |    2 +-
 theme/boost/scss/fontawesome/regular.scss          |    2 +-
 theme/boost/scss/fontawesome/solid.scss            |    2 +-
 theme/boost/scss/fontawesome/v4-shims.scss         |   17 +-
 theme/boost/scss/moodle/core.scss                  |    6 -
 theme/boost/scss/moodle/course.scss                |    4 +
 theme/boost/style/moodle.css                       |   31 +-
 theme/boost/thirdpartylibs.xml                     |    2 +-
 theme/classic/style/moodle.css                     |   31 +-
 user/classes/output/user_roles_editable.php        |    4 +-
 version.php                                        |    4 +-
 webservice/lib.php                                 |    3 +
 webservice/soap/locallib.php                       |    2 +-
 382 files changed, 7953 insertions(+), 3077 deletions(-)
 create mode 100644 .github/workflows/windows.yml
 create mode 100644 lib/phpxmlrpc/Exception.php
 create mode 100644 lib/phpxmlrpc/Exception/FaultResponseException.php
 create mode 100644 lib/phpxmlrpc/Exception/NoSuchMethodException.php
 create mode 100644 lib/phpxmlrpc/Exception/ParsingException.php
 create mode 100644 lib/phpxmlrpc/Exception/ServerException.php
 create mode 100644 lib/phpxmlrpc/Exception/StateErrorException.php
 create mode 100644 lib/phpxmlrpc/Exception/TransportException.php
 create mode 100644 lib/phpxmlrpc/Exception/TypeErrorException.php
 create mode 100644 lib/phpxmlrpc/Exception/ValueErrorException.php
 create mode 100644 lib/phpxmlrpc/Exception/XmlException.php
 create mode 100644 lib/phpxmlrpc/Exception/XmlRpcException.php
 create mode 100644 lib/phpxmlrpc/Helper/Interop.php
 create mode 100644 lib/phpxmlrpc/Traits/CharsetEncoderAware.php
 create mode 100644 lib/phpxmlrpc/Traits/DeprecationLogger.php
 create mode 100644 lib/phpxmlrpc/Traits/LoggerAware.php
 create mode 100644 lib/phpxmlrpc/Traits/ParserAware.php
 create mode 100644 lib/phpxmlrpc/Traits/PayloadBearer.php
 create mode 100644 mod/book/classes/helper.php
 create mode 100644 mod/book/tests/helper_test.php
 delete mode 100644 mod/quiz/report/statistics/tests/behat/random_essays.feature
 create mode 100644 mod/quiz/report/statistics/tests/behat/random_questions.feature
 create mode 100644 question/bank/exporttoxml/lib.php
 create mode 100644 question/bank/exporttoxml/tests/behat/preview_question.feature
 create mode 100644 question/classes/local/statistics/statistics_bulk_loader.php
 create mode 100644 question/classes/question_reference_manager.php
 create mode 100644 question/engine/tests/question_reference_manager_test.php
 create mode 100644 question/tests/local/statistics/statistics_bulk_loader_test.php

AND to actually upgrade a site under git, much easier than the process
you have been using:

php admin/cli/upgrade.php --non-interactive [ENTER]

Yours, 'in the Spirit of Sharing' -  (SoS)
Ken