DOMDocument missing in php5.6

Fadil Olamyy Wahab picture Fadil Olamyy Wahab · Jan 3, 2017 · Viewed 9.6k times · Source

I'm attempting to set up a store using opencart which i am honestly very new to. I bought a theme and for some reason the team uses vqmod. I was able to install the vqmod using:

localhost/mystore/vqmod/install

and i get this response.

VQMOD ALREADY INSTALLED!

Now, when i navigate to

localhost/mystore

An error pops up saying

DomDocument

The full error message is

VQMod::bootup - ERROR - YOU NEED THE PHP "DOMDocument" EXTENSION INSTALLED TO USE VQMod

After a little research, i figured i had to install the php5.6-xml and php7.0-xml which i have.

However the error is still showing.

I went into the vqmod code and noticed the section raising the error is this.

if(!class_exists('DOMDocument')) {
        die('VQMod::bootup - ERROR - YOU NEED THE PHP "DOMDocument" EXTENSION INSTALLED TO USE VQMod');
    }

which means there's a DOMDocument class i'm missing.

However, i have tried everything i've seen online. From installing php-xml, purging php, installing php-dom,restarting apache2, checking phpinfo.

None of these seem to solve the issue.

How do i get the DOMDocument class?

Answer

Nanhe Kumar picture Nanhe Kumar · Feb 5, 2019

I have solved this issue on PHP 7.2.10-0ubuntu0.18.04.1 with bellow commands.

sudo apt-get install php7.2-xml
sudo apt-get install php7.2-mbstring