Moodle 3.5 and php 7.4

Moodle 3.5 and php 7.4

by Paul Lindgreen -
Number of replies: 8
Picture of Particularly helpful Moodlers

We are currently using moodle 3.5.12 and php 7.2.17 and want to upgrade both to moodle 3.9 and php 7.4

According to moodle documention on php support (PHP - MoodleDocs):

  • Moodle 3.4 and Moodle 3.5 require PHP 7.0 or PHP 7.1 or PHP 7.2
  • Moodle 3.6 requires PHP 7.0 or later
  • Moodle 3.7 and later require PHP 7.1 or later

If moodle 3.5 does not support php 7.4 what is the recommended upgrade approach?

Do I need to upgrade to moodle 3.9 first, then upgrade php 7.4 afterwards?


Average of ratings: -
In reply to Paul Lindgreen

Re: Moodle 3.5 and php 7.4

by Randy Thornton -
Picture of Documentation writers

"upgrade to moodle 3.9 first, then upgrade php 7.4 afterwards"

Yes, that is the way I have done it; it is the simplest way and 3.9 runs fine on 7.2.

The other way is much more complex, since some versions have upper limit restrictions, e.g. 3.6 and 3.7 won't run on 7.4, so you would have to update both Moodle and PHP in exact step. See: https://docs.moodle.org/dev/Moodle_and_PHP.

Be sure to check all the versions including the php dependencies in Site admin > Server > Environment. Click the "Update component" link in the upper right corner to get the latest environment data. Then choose 3.9.4 (latest) in the pull down and make sure all the statuses are good.
Average of ratings: Useful (2)
In reply to Paul Lindgreen

Re: Moodle 3.5 and php 7.4

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
In addition to what Randy says, I will try to help.

You currently have Moodle 3.5.12 and php 7.2.17. According to Visvanath's excellent web page, It appears that 3.10 will work with your version of php.  It appears to me that you should be able to upgrade your Moodle to 3.9 first (why not 3.10), then upgrade your php.  It appears that if you first upgrade php to 7.4 that your Moodle 3.5.12 might not work.

I forget if you need to step through any of the intermediate versions of Moodle before 3.9, but follow the logic on Visvanath's web page.

I also recommend backing up your Moodle before making this migration.  Even better, do the upgrade on an experimental server and experimental Moodle.  Be careful that you have plugin updates (to Moodle 3.9) that will work as you upgrade your Moodle.
Average of ratings: Useful (2)
In reply to Rick Jerz

Re: Moodle 3.5 and php 7.4

by Marcos SarLo -
Picture of Particularly helpful Moodlers
Thanks for your feedback Randy and Rick, now it is clear to me that I must first update to version 3.9 and then update PHP.
In any case, the question I have to update my Moodle is, should I install the intermediate versions, that is: 3.6, 3.7 and 3.8 before reaching 3.9 ?, or could I update, for example, directly to 3.7 and then at 3.9?

Regards.
Marcos.
In reply to Marcos SarLo

Re: Moodle 3.5 and php 7.4

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 can update to 3.9 directly.

As ever, always take backups.
Average of ratings: Useful (1)
In reply to Marcos SarLo

Re: Moodle 3.5 and php 7.4

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

The permitted "long jumps" are also shown in the table http://www.syndrega.ch/blog/#php-and-dbms-compatibility-of-major-moodle-releases, in column 2 "Earliest from".

If your target version is 3.9 and you are at 3.5, I prefer the straight upgrade - both are LTS and well worn. What you should not forget is to keep your site updated (to 3.5.latest).
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: Moodle 3.5 and php 7.4

by Marcos SarLo -
Picture of Particularly helpful Moodlers
Thanks Visvanath, I had not noticed the column "Earliest from", I will take into account your valuable comments and will do the tests to update directly to 3.9