After installing moodle I am getting following service check alerts need advice

After installing moodle I am getting following service check alerts need advice

by Madhukar Boppidi -
Number of replies: 7

HI,

After installing moodle version 3.6.6, I am getting following service check alerts need advice.

php_extension intl  --> must be installed and enabled      --> Plugin Status Mark is check

php_setting
--> opcache.enable --> PHP setting should be changed --> Plugin Status Mark is check .

I am on php version 7.3.12 , I appreciate your suggestions on this .


Thanks,

Madhukar

Average of ratings: -
In reply to Madhukar Boppidi

Re: After installing moodle I am getting following service check alerts need advice

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

You don't tell us anything about your server, e.g. is it Linux, Microsoft Windows? Did you install it, is it a VPS, or a shared server managed by a third party?

But in short you need to install the mandatory PHP extensions for Moodle, including intl, and you should install the recommended ones, e.g. OPcache. Moodle 3.6 will run without OPcache but it's significantly faster with it.

Installing extensions will vary with the type of server you have but the Moodle Docs PHP page includes how to install missing extensions.

In reply to Leon Stringer

Re: After installing moodle I am getting following service check alerts need advice

by Madhukar Boppidi -
Hi Leon, Please find my comments inline below.

You don't tell us anything about your server, e.g. is it Linux, Microsoft Windows? Did you install it, is it a VPS, or a shared server managed by a third party? --> I am on redhat linux system. Yes this is completely new installation which I did.

But in short you need to install the mandatory PHP extensions for Moodle, including intl, and you should install the recommended ones, e.g. OPcache. Moodle 3.6 will run without OPcache but it's significantly faster with it. --> The php version 7.3.12 is recommended by Moodle it self, in my php.ini file i see the configuration for intl, but still when I am trying to access my moodle site I am not even navigating from server check page.

I see the extensitiona but when I install it through YUM it is not updating my current pHP, it it going to default location /usr.

Please advice .

Installing extensions will vary with the type of server you have but the Moodle Docs PHP page includes how to install missing extensions.
In reply to Madhukar Boppidi

Re: After installing moodle I am getting following service check alerts need advice

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

Something I should have picked up on earlier: "The php version 7.3.12 is recommended by Moodle it self", this is not quite correct, Moodle 3.6 lists PHP 7.3 as not ready for production use. I doubt it's causing this problem but it's worth taking note of this.

You'll need to tell us how you installed PHP 7.3. I normally install PHP 7.x using the IUS repo in which case I'd use yum install php73-intl. If you installed it using a third party repo like IUS which repo did you use and what package are you trying to install with yum? Or did you install PHP from source? Or some other way? (I'm assuming RHEL like CentOS doesn't ship with PHP 7.x).


In reply to Leon Stringer

Re: After installing moodle I am getting following service check alerts need advice

by Madhukar Boppidi -
Hi Leon,

We compiled PHP using ./configure command.
The command also included intl and opcache along with other extensions.
After this, in php.ini file we referred the extensions as below:
1. opcache:
zend_extension = "location of opcache.so"
We were able to verify the Zend opcache is up and running.
2. intl:
extension="location of intl.so"

Please advise.
In reply to Madhukar Boppidi

Re: After installing moodle I am getting following service check alerts need advice

by Ken Task -
Picture of Particularly helpful Moodlers

Well pardon my intrusion ...

First ... it's been years and years since I compiled AMP stack.  While compiling did optimize per server, finally decided using package managers was better.  Why?  Any security updates ... which could come at any time ... could be acquired only by re-compiling (can't mix yum/rpm installs with compiles).

Please see:

https://www.google.com/search?client=firefox-b-1-d&q=redhat+advisories+php

To see what's loading:

php -i |grep opcache

fist line for above will show:

/etc/php.d/opcache.ini,

ini/config for opache

php -i |grep intl

first line will show

/etc/php.d/intl.ini

catting that ini file:

[root@server]# cat /etc/php.d/intl.ini
; Enable intl extension module
extension=intl.so

extension_dir ... where one finds .so files (typically but not always):

/usr/lib64/php/modules

ls /usr/lib64/php/modules/intl*

a file intl.so should be present.

If it's not there, one then might need to find it:

find / -name intl.so

Then one has to use the full path in the ini file in modules.

Some php extensions are actually installed via pcel.

If this is a new server might best for easier admin in future to begin using/learning package manager.

My 2 cents of course! ;)

'SoS', Ken


In reply to Madhukar Boppidi

Re: After installing moodle I am getting following service check alerts need advice

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

To echo Ken's words there's nothing wrong with building from source but that will add to the work required to keep things up to date. Similarly if there are problems getting extensions installed then these are PHP questions not Moodle questions.

So I'd also recommend using one of the third party package repos to install PHP 7.x. It makes both keeping up-to-date and installing extensions easier.

Regardless of whether you're building from source or using packages you can list the installed extensions with php -m or also confirm if intl is installed with php -i | grep intl as Ken says. Do both of these list the extension?

Also Ken says "If you did install missing php extensions, apache service needs to be restarted for system to be aware of them": are you using Apache or Nginx? It's systemctl restart httpd to restart Apache. Do you know if you're using mod_php or PHP-FPM? It's systemctl restart php-fpm to restart PHP-FPM.

This may all seem complicated but an environment built from source is unique to your environment so we have to ask lots of questions. If it's built from packages both the environment and the steps to make changes are more generic.

In reply to Madhukar Boppidi

Re: After installing moodle I am getting following service check alerts need advice

by Ken Task -
Picture of Particularly helpful Moodlers

In addition to Leon's ...

If you did install missing php extensions, apache service needs to be restarted for system to be aware of them.

System true RedHat EL or CentOS?

cat /etc/redhat-release

will tell you.

PHP 7.3 not available with true RH or CentOS without using 3rd party repos for yum (Yellow Dog Manager - which is python) front end package manager most often used but behind the scenes of yum rpm still there - rpm = RedHat Package Manager).

So to discover how php 7.3.x installed (from what reepo) might have to use

rpm -qa|grep php

and if you wouldn't mind sharing info from the following command might be able to sort this out more quickly:

yum repolist

'SoS', Ken