andi create a php file with a phpinfo() call
open it via your webbrowser and check for the xml module (it is probably missing)
check the output for the used php version, what type of PHP interpreter is used (mod_php or fpm) and where the loaded php.ini is located
use the information of 3. to load the xml extension for the correct PHP install
This is the result of phpinfo(); the xml module seems to be there, as per my O.P.
cat phpinfo.txt | grep -i xml
Loaded Modules core mod_so mod_watchdog http_core mod_log_config mod_logio mod_version mod_unixd mod_access_compat mod_alias mod_auth_basic mod_authn_core mod_authn_file mod_authz_core mod_authz_host mod_authz_user mod_autoindex mod_deflate mod_dir mod_env mod_filter mod_mime prefork mod_negotiation mod_php7 mod_reqtimeout mod_setenvif mod_status mod_xml2enc
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8
Accept text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8
xmlrpc_error_number 0 0
xmlrpc_errors Off Off
libxml
libXML support active
libXML Compiled Version 2.9.14
libXML Loaded Version 20914
libXML streams enabled
mbstring.http_output_conv_mimetypes ^(text/|application/xhtml\+xml) ^(text/|application/xhtml\+xml)
$_SERVER['HTTP_ACCEPT'] text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8
LIBXML Christian Stocker, Rob Richards, Marcus Boerger, Wez Furlong, Shane Caraveo
SimpleXML Sterling Hughes, Marcus Boerger, Rob Richards
XML Stig Bakken, Thies C. Arntzen, Sterling Hughes
XMLReader Rob Richards
xmlrpc Dan Libby
XMLWriter Rob Richards, Pierre-Alain Joye
mod_php7 is being used
apt show php7.4-xml
shows:
Package: php7.4-xml
Version: 1:7.4.33-5+0~20230409.78+debian10~1.gbpa1ea7f
Priority: optional
Section: php
Source: php7.4
Maintainer: Debian PHP Maintainers <team+pkg-php@tracker.debian.org>
Installed-Size: 261 kB
Provides: php-dom, php-simplexml, php-xml, php-xmlreader, php-xmlwriter, php-xsl, php7.4-dom, php7.4-simplexml, php7.4-xmlreader, php7.4-xmlwriter, php7.4-xsl
Depends: php-common (>= 1:81~), ucf, php7.4-common (= 1:7.4.33-5+0~20230409.78+debian10~1.gbpa1ea7f), libc6 (>= 2.4), libxml2 (>= 2.9.0), libxslt1.1 (>= 1.1.25)
Breaks: php7.4-xsl (<< 7.0.3-6~)
Replaces: php7.4-xsl (<< 7.0.3-6~)
Homepage: http://www.php.net/
Download-Size: 79.8 kB
pop The time stamps for the files are different. The file that displays correctly has a date and a time of day. The other has 2017 in place of a time of day, which looks rather like a year.
Linux show the date until is a year before the current date, then displays years.
andi The JPEGMeta lib uses the extension to parse EXIF/IPTC tags sometimes.
What is the criteria for using it or not?