Title: AMP &amp; Php7 error 500
Last modified: September 19, 2016

---

# AMP & Php7 error 500

 *  Resolved [zeance](https://wordpress.org/support/users/zeance/)
 * (@zeance)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/amp-php7-error-500/)
 * Greetings everyone.
 * I had the amp plugin running on ubuntu 14.04 nginx 1.4.6-1 and php 5.5.9, the
   database was hosted on amazon rds. After a catastrophic sequence of events and
   recovery I had the server running on ubuntu 16.04, nginx 1.10.0 and php7.0.8.
 * While among some other items that broke the AMP plugin started spewing out the
   following http 500 error. I’ve tried deleting the plugin files and reinstalling
   it. So far it has not worked. I’m at a bit of a loss at what to do with the error
   below. Any advice is welcome.
 * `Fatal error: Uncaught Error: Class 'DOMDocument' not found in /home/ubuntu/htdocs/
   wp-content/plugins/amp/includes/utils/class-amp-dom-utils.php:7 Stack trace: #
   0 /home/ubuntu/htdocs/wp-content/plugins/amp/includes/class-amp-content.php(76):
   AMP_DOM_Utils::get_dom_from_content('<p><strong>Dear...') #1 /home/ubuntu/htdocs/
   wp-content/plugins/amp/includes/class-amp-content.php(41): AMP_Content->sanitize('
   <p><strong>Dear...') #2 /home/ubuntu/htdocs/wp-content/plugins/amp/includes/class-
   amp-content.php(21): AMP_Content->transform() #3 /home/ubuntu/htdocs/wp-content/
   plugins/amp/includes/class-amp-post-template.php(185): AMP_Content->__construct('
   <strong>Dear Te...', Array, Array, Array) #4 /home/ubuntu/htdocs/wp-content/plugins/
   amp/includes/class-amp-post-template.php(68): AMP_Post_Template->build_post_content()#
   5 /home/ubuntu/htdocs/wp-content/plugins/amp/amp.php(113): AMP_Post_Template-
   >__construct(18895) #6 /home/ubuntu/htdocs/wp-includes/plugin.php(524): amp_render('')#
   7 /home/ubuntu/htdocs/wp-includes/template-loader.php( in /home/ubuntu/htdocs/
   wp-content/plugins/amp/includes/utils/class-amp-dom-utils.php on line 7`

Viewing 1 replies (of 1 total)

 *  Thread Starter [zeance](https://wordpress.org/support/users/zeance/)
 * (@zeance)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/amp-php7-error-500/#post-8225823)
 * The issue was narrowed down to missing php7 extension: php7.0-xml
 * installing that extension to php7 allows the plugin to function as expected.

Viewing 1 replies (of 1 total)

The topic ‘AMP & Php7 error 500’ is closed to new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

## Tags

 * [nginx](https://wordpress.org/support/topic-tag/nginx/)
 * [PHP7](https://wordpress.org/support/topic-tag/php7/)

 * 1 reply
 * 1 participant
 * Last reply from: [zeance](https://wordpress.org/support/users/zeance/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/amp-php7-error-500/#post-8225823)
 * Status: resolved