Fatal Error on Upload of SVG File
-
I just set up a new server running Ubuntu version 22.04 LTS, with Apache version 2.4.52, MySQL version 8.0.30-0ubuntu0.22.04.1, and PHP version 8.1.2. I then installed the latest version of WordPress, version 6.0.1.
I installed all the plugins, and the theme I wanted, but when I tried to import my images from my test sites, I got errors on the SVG files, but no other images. I then tried to upload the SVG files individually, and received this error…
Fatal error: Uncaught Error: Class "DOMDocument" not found in /var/www/valleypl/wp-content/plugins/safe-svg/vendor/enshrined/svg-sanitize/src/Sanitizer.php:94 Stack trace: #0 /var/www/valleypl/wp-content/plugins/safe-svg/vendor/enshrined/svg-sanitize/src/Sanitizer.php(198): enshrined\svgSanitize\Sanitizer->resetInternal() #1 /var/www/valleypl/wp-content/plugins/safe-svg/safe-svg.php(180): enshrined\svgSanitize\Sanitizer->sanitize() #2 /var/www/valleypl/wp-content/plugins/safe-svg/safe-svg.php(145): safe_svg->sanitize() #3 /var/www/valleypl/wp-includes/class-wp-hook.php(307): safe_svg->check_for_svg() #4 /var/www/valleypl/wp-includes/plugin.php(191): WP_Hook->apply_filters() #5 /var/www/valleypl/wp-admin/includes/file.php(802): apply_filters() #6 /var/www/valleypl/wp-admin/includes/file.php(1074): _wp_handle_upload() #7 /var/www/valleypl/wp-admin/includes/media.php(303): wp_handle_upload() #8 /var/www/valleypl/wp-admin/media-new.php(33): media_handle_upload() #9 {main} thrown in /var/www/valleypl/wp-content/plugins/safe-svg/vendor/enshrined/svg-sanitize/src/Sanitizer.php on line 94
Please advise…
The page I need help with: [log in to see the link]
- The topic ‘Fatal Error on Upload of SVG File’ is closed to new replies.