title: Getting error "Class 'DOMDocument' not found" in PHP
body: <p>I'm getting an error:</p>
  <pre><code>Symfony\Component\Debug\Exception\FatalThrowableError: Class 'DOMDocument' not found in /var/www/html/vendor/embed/embed/src/Request.php:246
  </code></pre>
  <p>I found online that I have to install php-xml and php-dom. First, I checked my php version:</p>
  <pre><code>/var/www/html# php -v
  PHP 7.1.33-17+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Aug  7 2020 14:46:52) ( NTS )
  Copyright (c) 1997-2018 The PHP Group
  Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
      with Zend OPcache v7.1.33-17+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
  </code></pre>
  <p>Then, I installed php-xml and php-dom:</p>
  <pre><code>sudo apt-get install php7.1-dom
  sudo apt-get install php7.1-xml
  </code></pre>
  <p>And restarted nginx:</p>
  <pre><code>sudo service nginx restart
  </code></pre>
  <p>But it's still showing the first error. I'm three hours into this and it's driving me insane.</p>