Error Msg: "Moodle requires the xml PHP extension. Please install or enable the xml extension."

Error Msg: "Moodle requires the xml PHP extension. Please install or enable the xml extension."

by A I -
Number of replies: 3

I am trying to install the latest version of Moodle 3.6.3 on Amazon Linux 2 (on EC2)

I have the server up and running and have also setup a mySQL database via RDS and have also setup the moodledata folder.

I am trying to initiate the Moodle setup process via the browser and getting the following error message within the Chrome browser on both web and mobile:

Error Message:

"Moodle requires the xml PHP extension. Please install or enable the xml extension."

I have installed PHP7.2 on the instance along with a number of additional PHP packages, including PHP-XML

I would appreciate any assistance the community members might be able to provide to resolve this issue.

Thank in advance.

Ai

Average of ratings: -
In reply to A I

Re: Error Msg: "Moodle requires the xml PHP extension. Please install or enable the xml extension."

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

Have you restarted the web server service to pick up this additional PHP package? On a CentOS 7 server with Apache the command systemctl reload httpd should do this, if you're using Nginx or a different Linux distribution the command may be different.

In reply to Leon Stringer

Re: Error Msg: "Moodle requires the xml PHP extension. Please install or enable the xml extension."

by A I -

Unfortunately no luck with restarting the server. I used the following commands

sudo su

service httpd stop

service httpd start

I used service httpd status to check the status.

Is there anyone else who is using PHP7.2 with Moodle 3.6.3? I am wondering if there might be any known compatibility issues.  Really at a loss otherwise...

In reply to A I

Try stopping/starting your instance in the EC2 Dashboard

by Ben Hinton -

I also had the same issue on EC2 with Amazon Linux release 2 (Karoo) after installing 'php-xml.x86_64 7.2.16-1.amzn2.0.1'. Apache restart wouldn't do it.

But after I stopped my EC2 instance in the EC2 Dashboard and then started it again - I managed to get past this problem.