Class \’DOMDocument\’ not found

Class \’DOMDocument\’ not found

Asked on December 22, 2018 in XML.
Add Comment


  • 3 Answer(s)

    If class DOM document not found:

         Install the DOM extension. Users can do so on Debian / Ubuntu using,

    sudo apt-get install php-dom
    

    On Centos / Fedora / Red Hat:

    yum install php-xml
    

         If user gets conflicts between PHP 5 and PHP 5.3 packages, they could try to see that the php53-xml package exists instead.

    Answered on December 22, 2018.
    Add Comment

    PHP 7.0, Ubuntu:

    apt-get install php7.0-xml
    

    PHP 7.0, CentOS / Fedora / Red Hat:

    yum install php70w-xml
    

    PHP 7.1, Ubuntu:

    apt-get install php7.1-xml
    

    PHP 7.1, CentOS / Fedora / Red Hat:

    yum install php71w-xml
    

    PHP 7.2, Ubuntu:

    apt-get install php7.2-xml
    

    PHP 7.2, CentOS / Fedora / Red Hat:

    yum install php72w-xml
    
    Answered on December 22, 2018.
    Add Comment

    The latest version of PHP7:

    sudo apt-get install php7.1-xml
    

       Also can do this, and apt-get will show you where it is

    sudo apt-get install php-dom
    
    Answered on December 22, 2018.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.