Upgrade moodle from 3.3 to 3.7 in centos7

Upgrade moodle from 3.3 to 3.7 in centos7

by jihen jihen -
Number of replies: 10

Hello

I want to upgrade Moodle from version 3.3 to 3.7 with centos7 , but i didn't find documentation with centos7, can you give me the rights commands to upgrade moodle .

Thanks in advance

Average of ratings: -
In reply to jihen jihen

Re: Upgrade moodle from 3.3 to 3.7 in centos7

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
How did you install version 3.3 in centos ?
In reply to Howard Miller

Re: Re: Upgrade moodle from 3.3 to 3.7 in centos7

by jihen jihen -
In reply to jihen jihen

Re: Re: Re: Upgrade moodle from 3.3 to 3.7 in centos7

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Ok - that seems like sensible instructions.

You need to read Upgrading. Essentially, you're downloading the new version of the Moodle code and replacing the code you installed (step 5.2.1) at /var/www/html/moodle. Just make sure you copy and put back the existing config.php to maintain all your settings. Moodle will upgrade everything else automatically.
In reply to Howard Miller

Re: Re: Re: Upgrade moodle from 3.3 to 3.7 in centos7

by jihen jihen -

Well i install the last version from git using this file https://docs.moodle.org/37/en/Git_for_Administrators , but when i turn it in the server this error appear :

 (Moodle 3.7 or later requires at least PHP 7.1.0 (currently using version 7.0.33). Some servers may have multiple PHP versions installed, are you using the correct executable?)

So i install php 7.2 but still the same error , what should i do ? 

In reply to jihen jihen

Re: Re: Re: Re: Upgrade moodle from 3.3 to 3.7 in centos7

by Ken Task -
Picture of Particularly helpful Moodlers

After upgrading php did you restart apache service?   Required for apache to see new version.

Also, the link shared did not cover git.

Git is better, IHMO, as your code stay where it's at.

So to upgrade from 3.3 to 3.7, mind sharing the git commands you used to acquire the 3.7 code?

A couple of checks:

php -v (that should find php-cli)

and in the code directory,

git branch -a

* should be on moodle_37 branch

fgrep '$release' version.php

'SoS', Ken

In reply to Ken Task

Re: Re: Re: Re: Re: Upgrade moodle from 3.3 to 3.7 in centos7

by jihen jihen -
Hello
well i solve this error by restarting the Apache server , but now i have this error :

"The Zip PHP extension is now required by Moodle, info-ZIP binaries or PclZip library are not used anymore."
i add the extension zip.so in the php.ini file and restarting apache again , but no result

How can i fix this error please
In reply to jihen jihen

Re: Upgrade moodle from 3.3 to 3.7 in centos7

by Ken Task -
Picture of Particularly helpful Moodlers

Before you do as Howard has suggested, login as admin, go to Server -> Environment.  Update the component.  Then use the drop down pick list and set to 3.7.

See what moodle says about environment.

'SoS', Ken 

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

Re: Re: Upgrade moodle from 3.3 to 3.7 in centos7

by jihen jihen -
Hello,
Thanks for your response
I upgrade the moodle ton 3.7 , where i change the version of php from php7.0 to php7.2
and i add the zip.so by installing "yum install php-pecl-zip"
So my issue is Resolved
Thank you so much
Average of ratings: Useful (1)
In reply to jihen jihen

Re: Re: Re: Upgrade moodle from 3.3 to 3.7 in centos7

by Ken Task -
Picture of Particularly helpful Moodlers

Maybe solved ... usually one installs php-common as well php, which does install some extensions:

[root@server cli]# rpm -ql php71w-common |grep zip
/etc/php-zts.d/zip.ini
/etc/php.d/zip.ini
/usr/lib64/php-zts/modules/zip.so
/usr/lib64/php/modules/zip.so

php71w above because the server above uses webtatic for the php repo.

As long as it works ... but if you have errors, consider installing php-common using yum.

'SoS', Ken


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

Re: Re: Re: Upgrade moodle from 3.3 to 3.7 in centos7

by jihen jihen -

yes i already did by this command :

yum install php72w-common


Average of ratings: Useful (1)