0

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?

Fadil Olamyy Wahab
  • 626
  • 2
  • 6
  • 15

4 Answers4

2

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
Nanhe Kumar
  • 15,498
  • 5
  • 79
  • 71
0

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.

JBES
  • 1,512
  • 11
  • 18
  • Have you checked it was not compiled with `--disable-dom`? You can check this with `phpinfo()` - http://php.net/manual/en/dom.installation.php – JBES Jan 03 '17 at 06:22
  • Under what section would this be cause i just searched the whole ``phpinfo()`` output for ``--disable-dom`` and it returned zero result. – Fadil Olamyy Wahab Jan 03 '17 at 06:35
  • 1
    At the top - 'Configure Command', however it seems this is a bug in PHP 5.6. Look for php5.6-xml with `apt-cache search php dom` - `apt-get install php5.6-xml` then restart Apache. – JBES Jan 03 '17 at 06:39
  • ``apt-cache search php dom`` returns ``php5.6-xml - DOM, SimpleXML, WDDX, XML, and XSL module for PHP`` – Fadil Olamyy Wahab Jan 03 '17 at 07:08
  • That is the package that should do it - `apt-get install php5.6-xml` and then restart Apache – JBES Jan 03 '17 at 09:22
0

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

mrtechmaker
  • 1,769
  • 12
  • 11
0

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 :)

Sergey Glotov
  • 20,200
  • 11
  • 84
  • 98