Uncaught Error: Class 'DOMDocument' not found #708

Closed
opened 2026-10-05 00:12:55 +02:00 by adam · 5 comments
Owner

With PHP 7 (in case it's related...), when opening index.php and seems to detect a new version is available, I get this error.

Fatal error: Uncaught Error: Class 'DOMDocument' not found in include/emogrifier.class.php:406

Stack trace:
#0 include/emogrifier.class.php(233): Emogrifier->createXmlDocument()
#1 include/functions_mail.inc.php(963): Emogrifier->emogrify()
#2 include/functions_mail.inc.php(861): move_css_to_body('<!DOCTYPE html ...')
#3 include/functions_mail.inc.php(473): pwg_mail(Array, Array, Array)
#4 admin/include/updates.class.php(223): pwg_mail_admins(Array, Array, false, true)
#5 include/page_tail.php(63): updates->notify_piwigo_new_versions()
#6 index.php(375): include('/var/www/html/p...')
#7 {main} thrown in include/emogrifier.class.php on line 406
With PHP 7 (in case it's related...), when opening index.php and seems to detect a new version is available, I get this error. ``` Fatal error: Uncaught Error: Class 'DOMDocument' not found in include/emogrifier.class.php:406 Stack trace: #0 include/emogrifier.class.php(233): Emogrifier->createXmlDocument() #1 include/functions_mail.inc.php(963): Emogrifier->emogrify() #2 include/functions_mail.inc.php(861): move_css_to_body('<!DOCTYPE html ...') #3 include/functions_mail.inc.php(473): pwg_mail(Array, Array, Array) #4 admin/include/updates.class.php(223): pwg_mail_admins(Array, Array, false, true) #5 include/page_tail.php(63): updates->notify_piwigo_new_versions() #6 index.php(375): include('/var/www/html/p...') #7 {main} thrown in include/emogrifier.class.php on line 406 ``` <!-- github-sync-id:258509763 -->
adam closed this issue 2026-10-05 00:12:55 +02:00
Author
Owner

Hello,

To fix this issue you need to install two package : "php-xml" and "php-mbstring".
When you installed these package you need to restart you're Apache server using : "service httpd restart" (Fedora) or "service apache2 restart" (Debian/Ubuntu).

Hello, To fix this issue you need to install two package : "php-xml" and "php-mbstring". When you installed these package you need to restart you're Apache server using : "service httpd restart" (Fedora) or "service apache2 restart" (Debian/Ubuntu). <!-- github-comment-id:330481265 -->
Author
Owner

Please add configuration checks for these extensions.

Please add configuration checks for these extensions. <!-- github-comment-id:347102107 -->
Author
Owner

...or document them in the requirements section. I've just run into this issue too.

...or document them in the requirements section. I've just run into this issue too. <!-- github-comment-id:365048418 -->
Author
Owner
OK, I have added it on http://piwigo.org/doc/doku.php?id=user_documentation:learn:install:before <!-- github-comment-id:365201893 -->
Author
Owner

Still useful for Ubuntu 24.04.1 LTS which bundles PHP 8.3... but unfortunately plegall's link no longer works. https://doc-fr.piwigo.org/hebergez-votre-piwigo/installer-piwigo/installer-piwigo-sur-debian seems to still have this information. Not yet in the English version.

Still useful for Ubuntu 24.04.1 LTS which bundles PHP 8.3... but unfortunately plegall's link no longer works. [https://doc-fr.piwigo.org/hebergez-votre-piwigo/installer-piwigo/installer-piwigo-sur-debian](https://doc-fr.piwigo.org/hebergez-votre-piwigo/installer-piwigo/installer-piwigo-sur-debian) seems to still have this information. Not yet in the English version. <!-- github-comment-id:2473998024 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#708