PHP提示 Fatal error: Class 'DOMDocument' not found in


How to fix PHP Fatal error: Class’DOMDocument’ not found in

PDF Print E-mail

Question: How to fix PHP Fatalerror: Class ‘DOMDocument’ not found in/var/www/html/index.php on line 171 or similar error?

NOTE: Received this error on a Centos5 environment while trying to run a PHPscript that makes use of the DOMDocument class



In the CLI (CommandLine Interface) run the following command

1.yuminstall php-xml

This will install XML support and will solve theDOMDocument issue