Php module is installed and loaded but I have an error

Nextcloud version:12.0.4
Operating system and version: Raspbian 9.3 (stretch)
Apache or nginx version: Apache 2.4.25
PHP version: 7.0.27

Issue: This evening, my raspberry pi stopped responding, so I restarted it. Since then, I have been unable to log into my Nextcloud install. Other webpages served by apache2 work, but not Nextcloud. The index.php page displays:

PHP module XMLReader not installed.

Please ask your server administrator to install the module.
PHP module libxml not installed.

Please ask your server administrator to install the module.
PHP modules have been installed, but they are still listed as missing?

Please ask your server administrator to restart the web server.

When I check to see if libxml is installed (with php -ri libxml) I get:

libxml

libXML support => active
libXML Compiled Version => 2.9.4
libXML Loaded Version => 20904
libXML streams => enabled

When I check to see if XMLReader is installed (with php -ri XMLReader) I get:

Extension 'XMLReader' not present.

I thought these are all part of php-xml package, which is installed.

Is this the first time you’ve seen this error? Yes

Steps to replicate it:

  1. I don’t know

The output of your Nextcloud log in Admin > Logging:

I cannot log into Nextcloud to be able to get the log. Is there another way? CLI?

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'ocum2q',
  'passwordsalt' => '+Ids7HxIb49rp0wEEbKzDfEMEE',
  'secret' => 'dsfjhgdsfdsSDFDSfeewY5xBBv6LbycAtgli9iTxNTel',
  'trusted_domains' =>
  array (
    0 => 'mydomain.com',
  ),
  'datadirectory' => '/mnt/nextcloud/data',
  'overwrite.cli.url' => 'https://mydomain.com/nextcloud',
  'dbtype' => 'mysql',
  'version' => '12.0.4.3',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'dbuser',
  'dbpassword' => 'password',
  'installed' => true,
);