Installation is failed. Error code: missingconfigversion

Installation is failed. Error code: missingconfigversion

by Azat Amirgali -
Number of replies: 22
Hi Moodle Community, 

I am trying to install the Moodle 4.3.3. Earlier tried v4.2.6 but the same error message below:



Current enveironment:
- Slackware 14.2;
- PHP 8.1.27 
mysql  v8.0.36
- Moodle 4.3.3

config.php:
**********************************************

$CFG->dbtype    = 'mysqli';      // 'pgsql', 'mariadb', 'mysqli', 'auroramysql', 'sqlsrv' or 'oci'

$CFG->dblibrary = 'native';     // 'native' only at the moment

$CFG->dbhost    = 'localhost';  // eg 'localhost' or 'db.isp.com' or IP

$CFG->dbname    = 'moodle';     // database name, eg moodle

$CFG->dbuser    = 'moodledbuser';   // your database username

$CFG->dbpass    = 'moodleDBPass';   // your database password

$CFG->prefix    = 'mdl_'; 

$CFG->wwwroot   = 'https://moodle.mydomain.de';

$CFG->dataroot  = '/home/moodle/moodledata';

$CFG->debug = (E_ALL | E_STRICT);  

 $CFG->debugdisplay = 1;

 $CFG->debuglog = true;            

*******************************************************************************

I checked the versions and it should be compatible. Tried to run from cli but it failed with the following message: 

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/apcu.so' - /usr/lib64/php/extensions/apcu.so: cannot open shared object file: No such file or directory in Unknown on line 0

Parse error: syntax error, unexpected ':', expecting ';' or '{' in /home/moodle/moodle/lib/classes/component.php on line 1169

apcu extention is installed in fact, during the web UI installation it's labeled green. (During each reinstallation test, db is dropped and created again to avoid issues and cache and temp dirs were cleaned. Any ideas, why my installation keep failing? 
Average of ratings: -
In reply to Azat Amirgali

Re: Installation is failed. Error code: missingconfigversion

by Azat Amirgali -
Before launching the installation, in "check list page" there is only one php_extention: exif that has the status "check", all other dependecies are marked as "Ok". So I am quite confused what exactly causing this strange outcome. After launching the install process, I also tried to instert the php version into mdl_config table. But it ends up with another error: "Could not find a top-level course." Basically, installation fails and I start all over again from scratch. What possible directions should I search in this case? and ideas?
In reply to Azat Amirgali

Re: Installation is failed. Error code: missingconfigversion

by Ken Task -
Picture of Particularly helpful Moodlers
Please see:
PHP setting max_input_vars must be >= 5000.

'SoS', Ken

In reply to Ken Task

Re: Installation is failed. Error code: missingconfigversion

by Azat Amirgali -
Yes, this is correct, it's set to 5000.
In reply to Azat Amirgali

Re: Installation is failed. Error code: missingconfigversion

by Ken Task -
Picture of Particularly helpful Moodlers
Please see:
apcu isn''t required or recommended so drop from loading.
and start apache + php-fpm services.

Check what's loading via command line:
php -m
and/or a phpinfo.php page at apache document root.

After your failed attempt did you drop all tables from DB?
Did you purge all caches in moodledata ... directories: cache, muc, localcache?

Would advise doing the install via command line by using the code/admin/cli/ install.php script.
Takes web service out of loop and if server is behind something like CloudFlare or other like mod_security, by passes that protection ... just php talking to your DB then.

'SoS', Ken

In reply to Ken Task

Re: Installation is failed. Error code: missingconfigversion

by Azat Amirgali -
Concerning your suggestions:
1. I checked loaded php modules as suggested (php -m). All required extensions modules are loaded including "apcu".
2. max_input_vars must be >= 5000, set correct
3. Each time entire mysql "moodle" DB is dropped and created again according to the documentation. Also content of moodledata directory completly removed (rm -rf ../moodledata/*).
4. Trying to launch from cli and got following outcome:
/usr/bin/php ../admin/cli/install.php
*********************************************
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/apcu.so' - /usr/lib64/php/extensions/apcu.so: cannot open shared object file: No such file or directory in Unknown on line 0

Parse error: syntax error, unexpected ':', expecting ';' or '{' in /home/moodle/moodle/lib/classes/component.php on line 1169
********************************************************
In reply to Azat Amirgali

Re: Installation is failed. Error code: missingconfigversion

by Ken Task -
Picture of Particularly helpful Moodlers
max_input_vars must be >= 5000 - is greater than or equal to ... bump that value up some more ... 7000?

 So this is the exact command you are using to install?

/usr/bin/php ../admin/cli/install.php

../ is up one level is it not? So if you were in a code directory, php would be looking where?
Be located in the code directory ... /usr/bin/php admin/cli/install.php

Do you have: /usr/lib64/php-zts/ ?

'SoS', Ken

In reply to Ken Task

Re: Installation is failed. Error code: missingconfigversion

by Azat Amirgali -
Hi Ken Task,
Thank you for your quick response. Concerning your questions:
1. It's set equal to 5000: max_input_vars = 5000. Should I increase it?
2. Actually, I am running install script directly from /moodle/admin/cli directory: /usr/bin/php install.php
Sorry for confusion I should have used "~" instead of "../"
3. No, there is no /usr/lib64/php-zts/ directory.
In reply to Azat Amirgali

Re: Installation is failed. Error code: missingconfigversion

by Azat Amirgali -
I've increased max_input_vars = 7000; and tried again but got the same outcome. So there must be something else.. not sure what is the cause.. any ideas?
In reply to Azat Amirgali

Re: Installation is failed. Error code: missingconfigversion

by Ken Task -
Picture of Particularly helpful Moodlers
Am unfamiliar with package manager for Slackware - which is how one installs php + extensions.   What is the package manager for Slackware?   Did find the following:


What does:
php -v
show?
Installing from command line, that's what you are using.

Installing from web is using another php executable for web service.

In a phpinfo.php page at root of web service, you can see which php.ini is being loaded
for web.

This:
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/extensions/apcu.so'
is a warning but still ... apcu extension is not required to run a moodle so remove it.

And, since you are using command line, suggest using git to acquire moodle.

Once a moodle is installed, there will be updates to core code and git is by far the best way to manage that!

'SoS', Ken

In reply to Ken Task

Re: Installation is failed. Error code: missingconfigversion

by Azat Amirgali -
php -v shows:
******************************************
PHP 8.1.27 (cli) (built: Dec 24 2023 10:56:17) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.27, Copyright (c) Zend Technologies

******************************************
phpinfo is below:




I also cloned the git repo and checkeout MOODLE_403_STABLE. Concerning the ssh access, not possible. Also checked the line according to the error message: Parse error: syntax error, unexpected ':', expecting ';' or '{' in /home/moodle/moodle/lib/classes/component.php on line 1169
************************************************

*************************************************
Line 1169 doesn't seem suspicious. As you mentioned, if it fails, then it fails for everyone. But this is not the case. It fails to get the version. I checked version.php, actual version should be $version  = 2023100903.00;   
What else I'm missing here? 
In reply to Azat Amirgali

Re: Installation is failed. Error code: missingconfigversion

by Ken Task -
Picture of Particularly helpful Moodlers
Wow!   I haven't seen a 'configure command' info box in years and years.
That shows the command that was used to compile php.   Used to do that many years ago ... frustrating when one didn't compile support for a php extension that you discovered later was needed to support apps like a moodle.   Couldn't install just that plugin from package manager, had to recompile again. sad

Did you compile it? or is that how SlackWare Package manger works?

That phpinfo.php page has a lot more than what you've shared ... is that pesky acpu thang listed?

Also see it shows which php.ini file it's loading ... did you check that php.ini file for extensions to load? 

get ***ALL*** versions ... just about every mod/block/theme has a version.php file.
So there is some component (mod/block/theme) that ain't right!

Do this command from the code directory and you will see:
find ./ -name version.php
In a 4.1.9 there are 449 version.php files!

Am beginning to think that the bottom line to this is SlackWare is a no go!  Unless you get down and dirty with compiling AMP stack ... I wouldn't do that any more!

Do you have some other machine ... not SlackWare ... like Ubuntu ... you could use?

How about wiping out SlackWare on the machine you are using and putting on Ubuntu?

At this stage .... sorry, but beyond me! sad
Good luck!

'SoS', Ken


In reply to Ken Task

Re: Installation is failed. Error code: missingconfigversion

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
> Do you have some other machine ... not SlackWare ... like Ubuntu ... you could use? https://moodle.org/mod/forum/discuss.php?d=359967
> > How about wiping out SlackWare on the machine you are using and putting on Ubuntu?

Slackware binary repos give (gave) most trouble-free, smooth experience. I grudgingly changed to Debian because server providers don't offer a Slackware image. Source compilation path could be hard, but that is the case in any Unixode, but not the Slackware binary packages.
In reply to Visvanath Ratnaweera

Re: Installation is failed. Error code: missingconfigversion

by Azat Amirgali -
Thank you for this advice. Yes, I agree with you. It's a legacy server, all other servers are already Ubuntu smile
In reply to Azat Amirgali

Ri: Re: Installation is failed. Error code: missingconfigversion

by Sergio Rabellino -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Ehmmm... no, it fails at the ":" for a syntax error, so your PHP interpreter doesn't not like that code. the ":" start the return type declaration which will be an array.

Could you try from the cli the following: php -l /home/moodle/moodle/lib/classes/component.php ?
If returns "no syntax errors detected..." then probably you have some syntax errors in your config.php that broke the code that follows.

Anyway, I'm a old (maybe too old) Slackware contributor and user since 0.18 (1988 or 89), now I use RockyLinux, but no, don't wipe Slack. smile
Average of ratings: Useful (2)
In reply to Sergio Rabellino

Re: Fugitives from the Church of SubGenius [OT]

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Sergio

> I'm a old (maybe too old) Slackware contributor and user since 0.18 (1988 or 89)

 Delighted to meet another fugitive from the  Church of the SubGenius.





In reply to Visvanath Ratnaweera

Ri: Re: Fugitives from the Church of SubGenius [OT]

by Sergio Rabellino -
Picture of Particularly helpful Moodlers Picture of Plugin developers
I didn't know yet this, I'm going to take a look 🤣
In reply to Sergio Rabellino

Re: Fugitives from the Church of SubGenius [OT]

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
The running joke, people would call it a meme today, I think, was that nobody has seen Patrick, the benevolent dictator and one-man show behind Slackware - not even a photo. He was so secretive. I don't know who started using the SubGenius as his avatar but once started the geeks let loose their creativity.
smile
In reply to Ken Task

Re: Installation is failed. Error code: missingconfigversion

by Suzanne Goodfellow -
To install, I went through the CPanel and dropped the zip file into bin after I created the database in cpanel.  Moodle worked great until I went to themes and wanted to install Moove.  The Moove file is what caused the error messages to pop up, not the Moodle install.  Maybe I need to go remove the Moove folder?  I did not create the mess in my PHPadmin.  Bluehost and its Helpdesk created about 11 databases trying to "fix" staging area problems.  If I could figure out which databases went with which domains, instead of the codes that they are named, I would have everything neat and tidy.
Still I do not know how to upgrade or downgrade except deleting folders.
Suzanne G.
In reply to Suzanne Goodfellow

Re: Installation is failed. Error code: missingconfigversion

by Suzanne Goodfellow -
I appreciate all of your help! I removed the theme and was able to get back to my moodle site administrator. I will use Boost for now and wait to see if there is progress here. You guys are really top notch developers! No wonder there was frustration in your response. You must want to pull your hair out at non-programmers. After I get my courses up, I'm going to take the Moodle developer courses to see if I can learn more there.
Great job with this LMS Moodle. It's the best that I have seen.❤💕✔
Suzanne G.
In reply to Suzanne Goodfellow

Re: Installation is failed. Error code: missingconfigversion

by Ken Task -
Picture of Particularly helpful Moodlers
@Suzanne Goodfellow
"Still I do not know how to upgrade ..."

Moodle has Docs ... if you have not discovered that yet, here's where:

It's a place to start! smile

'SoS', Ken

In reply to Azat Amirgali

Re: Installation is failed. Error code: missingconfigversion

by Ken Task -
Picture of Particularly helpful Moodlers
I'll say it again ... apcu extension ... a usr cache ... is NOT needed for Moodle.
Remove it ... however one does that on Slackware!

This part:
Parse error: syntax error, unexpected ':', expecting ';' or '{' in /home/moodle/moodle/lib/classes/component.php on line 1169

is puzzling as it says there is a parse error - syntax .... on a certain line in a certain file which needs to be called to do your install.
Have you looked at line 1169 of that file to see if you can't get a clue.

IF this was a problem for everyone, there would be many many people in here saying 'me too!  me too!' ... and there aren't!!!! :|

Are you open to the idea of granting me access to your server via ssh?

'SoS', Ken

In reply to Ken Task

Re: Installation is failed. Error code: missingconfigversion

by Azat Amirgali -
Finally, I was able to install it with install_database.php script. From /moodle/admin/cli/ directory I executed this script:

php install_database.php --adminpass=adminpass --agree-license

Web UI is accessible and I need to setup further steps, cron, user, permissions etc. Thank you very much for your support, expecially Ken Task. I'm completely new with Moodle and need some time to play with it smile 

Average of ratings: Useful (1)