Support » Plugin: AMP » AMP & Php7 error 500

  • Resolved zeance


    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


    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.