Config table does not contain version error

Config table does not contain version error

by Mehdi ZOUAOUI -
Number of replies: 13

Hello everyone,

I was recently trying to install Moodle on a local server and everything was working fine till I reached the final stage of installation I was faced with this error (in attachment). I went through the following stages that were described in one of the posts but without any success:

error/debug/missingconfigversion
The most likely cause of this error is that the 'version' key is missing from your configuration dictionary. Steps to fix:
Open <moodleinstalldir>/version.php
Find the value in $version
Open 'mdl_config' in database manager
Insert key after last entry with name = 'version' and value = <value found in version.php>


Can anyone suggest or advise on how to overcome this issue.


Thanks in advance

Average of ratings: -
In reply to Mehdi ZOUAOUI

Re: Config table does not contain version error

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Something went wrong during the install and it (almost certainly) didn't complete. You haven't told us the version or anything about the 'local server' so there's very little specific to say to you. 

The advice from the above post is crazy wink

In general...

* find and check the release notes for the version you are using and be 100% sure that your server meets the requirements.
* Start again but this time.... copy config-dist.php to config.php and edit the database etc. parameters manually. Then go down to the debugging section and enable debugging. Start the install again and watch very carefully for errors and warnings.

If you're still stuck, you're going to have to give us the full details.
In reply to Howard Miller

Re: Config table does not contain version error

by Mehdi ZOUAOUI -
Hi dear Howard,

Thank you very much for your kind reply. I passed all the requirments of the server. When I try to add a new entry in
Here are the versions of PhP, Moodle and other related things I have:

1- Moodle: Moodle 3.7.2+
2- Xamp: v3.2.4
3- PHP version inside Moodle: 2019052002.08
4- The version of the PhP I see in localhost written as (PHP extension) is: 20160303. I tried to be smart and changed the version found in "version.php" but the problem was not solved.

I just tried to copy config-dist.ph to config.php but an error message occured (parse error: syntax error, unxpected '<', expecting end of file in c:\xampp\htdocs\englishdm\config.php on line 31)

When I insert a new entry on "mdl_config" as was suggested in previous posts I cannot see the new entry that I created after clicking on "Go". I tried to look on internet for video tutorial that explains how to solve this issue but couldn't find any.
In reply to Mehdi ZOUAOUI

Re: Config table does not contain version error

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
As I say... trying to insert the value in the database will NOT help. This is bad advice.

None of your versions make sense. Xampp is currently at 12.something. I can't find any record of a version 3.2.4. What operating system are you using.

The version of the PHP extension is nothing to do with the version of PHP.

As you are using xampp can I assume you just want to try Moodle. It might be easier for you to use MoodleCloud instead.
In reply to Howard Miller

Re: Config table does not contain version error

by Mehdi ZOUAOUI -
Hi dear Howard again,

Sorry, my bad. I was looking at the XAMPP control panel version. The XAMPP is 7.1.32 and here the version of other related things:
+ Apache 2.4.41
+ MariaDB 10.4.8
+ PHP 7.1.32 (VC14 X86 64bit thread safe) + PEAR
+ phpMyAdmin 4.9.1
+ OpenSSL 1.1.1d
+ ADOdb 518a
+ Mercury Mail Transport System v4.63 (not included in the portable version)
+ FileZilla FTP Server 0.9.41 (not included in the portable version)
+ Webalizer 2.23-04 (not included in the portable version)
+ Strawberry Perl 5.16.3.1 Portable
+ Tomcat 7.0.92
+ XAMPP Control Panel Version 3.2.4.
+ XAMPP mailToDisk 1.0 (write emails via PHP on local disk in \mailoutput. Activated in the php.ini as mail default.)

I'm using Windows 7 Professional as an operating system. I tried Moodle before and I installed Moodle packages for Windows. I wanted to install it on a local server (my laptop) manually without this pre-ready installation. I intend to create a course that will be beta-hosted. I'm trying to learn how to overcome such issues. I guess I have to do more reading in order to overcome this.

Thank you again and sorry for the confusion
In reply to Mehdi ZOUAOUI

Re: Config table does not contain version error

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
If you just want to get it running in Windows - you can use the complete "one click" package from the download page.

Other than that, I can't really help. I've never used Windows or XAMPP. My inclination would be to run a linux VM and install Moodle there. You could try something like, https://box.scotch.io/. But be prepared for some long nights big grin
In reply to Howard Miller

Re: Config table does not contain version error

by Mehdi ZOUAOUI -
Hi dear Howard,

I just solved the issue. This is what I did:
1- Went to phpMyAdmin then opened the database I created.
2- Opened: MDL_config
3- Went to SQL tab then injected this code "INSERT INTO mdl_config (name,value) VALUES ('version','my version');"

I think, I spared myself, for the present, some nights :D
In reply to Mehdi ZOUAOUI

Re: Config table does not contain version error

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You'll be VERY lucky if you fixed it.

If the version was missing, what else was missing? wink
In reply to Howard Miller

Re: Config table does not contain version error

by Mehdi ZOUAOUI -
Just the version. The thing is that trying to edit MDL_config table only by using the "insert" button in the doesn't solve the problem and you're not likely to see the "version" entry. But if you manually inject in the "SQL" tab, you will be able to solve the problem. Now, I'm facing another problem which is in my eyes more challenging than the previous one. This error message showed up: "Coding error detected, it must be fixed by a programmer: Invalid property requested, or the property does not has a default value." You're eventually right! I will have to spend some nights without sleep :D
In reply to Mehdi ZOUAOUI

Re: Config table does not contain version error

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I was right in the first place.... there's very little point asking for advice and then ignoring it.

If the version number is missing then the installation failed and other things will be wrong. Which is what you have found out for yourself.

So you need to reinstall Moodle following the advice given to you several days ago.
In reply to Howard Miller

Re: Config table does not contain version error

by Mehdi ZOUAOUI -
Hi Howard again,

Thank you for your help, but I did all what you suggested and even reinstalled Moodle many times (which was my first step) without any success. This is a very common error and I didn't post here till after checking and reading what I came into my hand.

Thank you again
In reply to Mehdi ZOUAOUI

Re: Config table does not contain version error

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
If installation is failing, the first step is to run the install with Debugging on. The only way to do that is to create your own config.php (from config-dist.php). That shouldn't be a big problem. Moodle will recognise that config.php already exists and skip that part of the install.

You can then check for messages and check your web server's error log. Hopefully something shows up smile
In reply to Mehdi ZOUAOUI

Re: Config table does not contain version error

by David M. Gegbai -

Hi Mehdi,

I had the same problem and was reading through you and Howard's conversation and had an idea on what to do.

I applied my idea and successfully installed moodle.

The things I did were:

  1. Search in the mdl_config table for the "version" data by entering "Select * from mdl_config where name = 'version'".
  2. This brought me the version data, which I then easily clicked on "edit" and edited the version number to the value in the version.php file, interestingly though, all I had to do was add ".00" to the value
  3. I then executed it by clicking on "go", then I stopped my xampp server, and restarted it again
The reason I restarted my xampp server was because when I tried to reload my moodle installation page, it said that my site was being updated, so since I was the one doing the updating, I just restarted my server, and then continued with the rest of the installation.

I want to thank you and Howard though, your conversation was what gave me the idea on what to do.

Hope this post helps you and others in the future.

And, I'm using Ubuntu 18.04, however, I believe that the same procedure will work in windows and mac
In reply to David M. Gegbai

Re: Config table does not contain version error

by Jeff Cold -

This sounds like a really nice solution to a common problem, but you don't mention where the mdl_config table is....in the moodle table in the database?  You don't mention what application you used to make the changes.  Is this unique to xampp?  If you're CLI only on an Ubuntu server could I implement this solution?