DOMDocument missing in php5.6

11.4k Views Asked by At

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?

4

There are 4 best solutions below

5
JBES On

DOMDocument is part of the PHP DOM extension along with libxml which are enabled by default hence should already be part of PHP. You may need to recompile PHP.

0
mrtechmaker On

As mentioned by JBES - apt-get install php5.6-xml did work for me.

0
krishnapraveen kumar On

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

Best resolution which helped me is to write in PHP.ini:

extension=dom.so

This will solve the issue :)

0
Nanhe Kumar On

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