In order for moodle to be updated to newer versions the update of php version is inevitable. PHP8.1 will guarantee us the opportunity to update to moodle version 4.2. Note that the update must be condacted into a dev environment first. All custom plugins,themes,scripts must also be checked thorougly so we make sure that everything is working as it should.
\uD83D\uDCD8 Instructions
Instructions on how to install it on our EC2 instances. We take for granted that we already have Amazon Linux 2 installed with amazon-linux-extras.
The steps are as follows:
check what php version we currently have.
Uninstall php
sudo yum remove php* sudo yum remove /etc/php*
check that php is completely removed
whereis php php -v
After removing the packages, clean up your system:
sudo yum clean all
Disable Any Third-Party PHP Repositories. If you have any third-party repositories enabled (like Remi or EPEL), you should disable them to avoid conflicts:
sudo yum-config-manager --disable remi-php*
Enable PHP Repository via Amazon Linux Extras
sudo amazon-linux-extras enable php8.1
Install all php packages that are required for moodle to operate.
first install PHP
sudo yum install php
all php packages that are required
The iconv extension is required.
The mbstring extension is required.
The curl extension is required (required for networking and web services).
The openssl extension is recommended (required for networking and web services).
The tokenizer extension is recommended.
The xmlrpc extension is recommended (required for networking and web services).
The soap extension is recommended (required for web services).
The ctype extension is required.
The zip extension is required.
The gd extension is required.
The simplexml extension is required.
The spl extension is required.
The pcre extension is required.
The dom extension is required.
The xml extension is required.
The intl extension is required.
The json extension is required.
The appropriate extension for your chosen database is also required.
mysqlnd
Highlight important information in a panel like this one. To edit this panel's color or style, select one of the options in the menu.