0

Am I missing some dependency on the server? cURL is in php-xml is in etc.

I am trying to export an invoice to PDG and getting this error:

Fatal error: Class 'DOMDocument' not found in /MY-PATH/htdocs/system/expressionengine/third_party/store/vendor/dompdf/include/dompdf.cls.php on line 481

Hope you can help - Thanks

  • ReUpload the store files to make sure that they were transferred correctly. – Justin Long Apr 6 '13 at 20:38
2

DOMDocument is a built in PHP class. It sounds like the PHP DOM extension is disabled on your server - you will probably need to talk to your host about enabling it (it is enabled by default in PHP and I've never seen a host without it before).

To check this, you can visit Tools > Utilities > PHP Info in the EE control panel, and search for DOM/XML which should say enabled next to it.

1

Hmmm strange. Have you checked that the file it mentions is actually there?

If it is and it has read access then my guess would be that it's more of a memory issue. PDF generation can require a surprisingly large amount of memory (a min of 256MB) and I've had similar problems in the past. Make sure that you have at least 256MB as your memory limit in Tools > Utilities > PHP Info > memory_limit. Try increasing this to at least 256MB and seeing if that makes a difference.

What type of environment are you running on btw? Is this shared hosting?

  • Thanks to both of you guys. It is a bit odd. PHP DOM is enabled. The file exists and has perms set for access. It all seems to be working now for some reason. I did tweak the perms, but they did have access previously. Whatever I have done seems to have worked. Once again, many thanks for the support. You guys are a real asset to the community! Cheers. – T2theC Apr 8 '13 at 9:44
0

si usas centos estas lineas son la solución: Fatal error: Class 'DOMDocument' not found in /var/www/html/ include/ dompdf.cls.php on line 177

Solved the problem by:

To install PHP-XML run the following command: yum install php-xml

To install DOM/XML run the following command: yum whatprovides php-dom

To restart Apache run the following command: service httpd restart

0

On Ubuntu:

sudo apt-get install php5-dom

In my case

sudo apt-get install php5.6-dom

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.