XML stands for extensible Markup Language, this is a data format for read document interchange on the Web. This extension can helps simple and easily usable tool-set to convert XML to an object.  By default, this package is not installed in your instance or your local machine. So that we walk you through how to install XML-PHP extension on your CentOS and Ubuntu operating systems.

Ubuntu:

sudo apt-get install php-xml

or
sudo apt-get install php7.2-xml

 

CentOS:

sudo yum install php-xml

or
sudo yum install php72-php-xml


Restart the webserver,

If you are using Ubuntu operating system use the command below,

NGINX:

systemct restart nginx.service


Apache:
systemct restart apache2.service


If you are using CentOS operating system use the command below,

NGINX:

systemct restart nginx.service


Apache:

systemct restart httpd.service