Mixed Moodle versions detected, upgrade cannot continue

Mixed Moodle versions detected, upgrade cannot continue

by Vasilis Skouras -
Number of replies: 6
Hello,

I am running moodle in shared hosting with Plesk (no CLI access).  Suddenly, without having done anything, I am receiving a blank screen, with the message "Sorry, maintenance in progress".

I deleted climaintenance.html and I was able to get access, but when I log on as admin, I get the message "Mixed Moodle versions detected, upgrade cannot continue"

Has PLESK tried on its own to do an upgrade that failed?  Is there a way to stop that upgrade and have moodle working as it did before?

If I ask the provider to restore it from a previous image, is the problem going to go away, or is it going to come back again next time PLESK tries on its own to perform an upgrade?

Thanks
Average of ratings: -
In reply to Vasilis Skouras

Re: Mixed Moodle versions detected, upgrade cannot continue

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
This is a question for your host - moodle will not try and update itself on its own.  We have no idea what your hosting company might be doing...
In reply to Vasilis Skouras

Απάντ: Mixed Moodle versions detected, upgrade cannot continue

by Vasilis Skouras -
Below, the error message that I received. I'm sorry to be a nuisance, but would somebody have a little time to explain in simpler language (I am not an expert) what I need to do, please, please, pretty please? This is an installation in shared hosting. The host has denied any responsibility and refused any assistance, other than restoring from backup (which after a few hours turned the same results).

Thank you!!!

-----------------------------------------
Error: Update failed: Non-zero exit status returned by script. Output stream: 'Mixed Moodle versions detected, upgrade cannot continue The Moodle update process has been paused because PHP scripts from at least two major versions of Moodle have been detected in the Moodle directory. This can cause significant problems later, so in order to continue you must ensure that the Moodle directory contains only files for a single version of Moodle. The recommended way to clean your Moodle directory is as follows: * rename the current Moodle directory to "moodle_old" * create a new Moodle directory containing only files from either a standard Moodle package download, or from the Moodle Git repository * move the original config.php file and any non-standard plugins from the "moodle_old" directory to the new Moodle directory When you have a clean Moodle directory, refresh this page to resume the Moodle update process. This warning is often caused by unzipping a standard Moodle package over a previous version of Moodle. While this is OK for minor upgrades, it is strongly discouraged for major Moodle upgrades. This warning can also be caused by an incomplete checkout or update operation from the Git repository, in which case you may just have to wait for the operation to complete, or perhaps run the appropriate clean-up command and retry the operation. You can find more information in upgrade documentation at https://docs.moodle.org/310/en/Upgrading. '. Error stream: 'Mixed Moodle versions detected, upgrade cannot continue The Moodle update process has been paused because PHP scripts from at least two major versions of Moodle have been detected in the Moodle directory. This can cause significant problems later, so in order to continue you must ensure that the Moodle directory contains only files for a single version of Moodle. The recommended way to clean your Moodle directory is as follows: * rename the current Moodle directory to "moodle_old" * create a new Moodle directory containing only files from either a standard Moodle package download, or from the Moodle Git repository * move the original config.php file and any non-standard plugins from the "moodle_old" directory to the new Moodle directory When you have a clean Moodle directory, refresh this page to resume the Moodle update process. This warning is often caused by unzipping a standard Moodle package over a previous version of Moodle. While this is OK for minor upgrades, it is strongly discouraged for major Moodle upgrades. This warning can also be caused by an incomplete checkout or update operation from the Git repository, in which case you may just have to wait for the operation to complete, or perhaps run the appropriate clean-up command and retry the operation. You can find more information in upgrade documentation at https://docs.moodle.org/310/en/Upgrading. '.
In reply to Vasilis Skouras

Re: Απάντ: Mixed Moodle versions detected, upgrade cannot continue

by Ken Task -
Picture of Particularly helpful Moodlers
Most important file you have right now is the config.php file.
Save the config.php file currently in your code directory to another location on your server.

Next have to figure out what version is in the DB assuming that upgrade attempts did NOT touch the DB.
For that you will have to use phpmyadmin and query the DB for your moodle thusly:

select name,value from mdl_config where name like 'branch'

If your DB thinks it's for 3.9.x the branch will say 39
Ditto for 310, 311.

That tells us what code to acquire and use to get server backup and running.

https://download.moodle.org/releases/security/
you can find the latest 3.9 and 3.11

https://download.moodle.org/releases/legacy/
For 3.10

'SoS', Ken

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

Απάντ: Re: Απάντ: Mixed Moodle versions detected, upgrade cannot continue

by Vasilis Skouras -
Hi,

#1146 - Table 'moodle_6.mdl_config' doesn't exist

I think this might be a problem?
In reply to Vasilis Skouras

Re: Απάντ: Re: Απάντ: Mixed Moodle versions detected, upgrade cannot continue

by Ken Task -
Picture of Particularly helpful Moodlers
On shared systems, DB is also shared. sad
When you first launch phpmyadmin, in the left column, it list databases to which your account has access.
According to what you just shared, the account/DB for your moodle was/is moodle_6 ... the mdl_ is the prefix in front of the table config.

Check your config.php file.  You should see an array of variables for the DB - DB name.   And there is a line for 'prefix' as well.  Default for prefix is usually mdl_.

I gave you a query that used typical prefix ... your DB may have a different prefix and thus table can't be found.

Rather than executing the query, just select the DB, that should show all tables.   Browse the tables looking for config.

If that table doesn't exist, afraid you moodle is 'toast' using that DB! sad  Did you ever make a backup of the DB?

Sent you a PM on this system.   Please respond there!

'SoS', Ken



Average of ratings: Useful (1)