HostOnNet Blog

PHP Fatal error: Class ‘DOMDocument’ not found in LocalisationCache.php

While install MediaWiki 1.20.4, i got error

PHP Fatal error:  Class 'DOMDocument' not found in  LocalisationCache.php 

This is because PHP is not compiled with XML support, to fix install php-xml package.

[root@lin wiki]# yum install php-xml
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: mirrors.hns.net.in
 * epel: mirrors.ispros.com.bd
 * extras: mirrors.hns.net.in
 * updates: mirrors.hns.net.in
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-xml.x86_64 0:5.3.3-22.el6 will be installed
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.24)(64bit) for package: php-xml-5.3.3-22.el6.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.22)(64bit) for package: php-xml-5.3.3-22.el6.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.18)(64bit) for package: php-xml-5.3.3-22.el6.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.13)(64bit) for package: php-xml-5.3.3-22.el6.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.11)(64bit) for package: php-xml-5.3.3-22.el6.x86_64
--> Processing Dependency: libxslt.so.1()(64bit) for package: php-xml-5.3.3-22.el6.x86_64
--> Processing Dependency: libexslt.so.0()(64bit) for package: php-xml-5.3.3-22.el6.x86_64
--> Running transaction check
---> Package libxslt.x86_64 0:1.1.26-2.el6_3.1 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================
 Package                                                 Arch                                                   Version                                                           Repository                                            Size
============================================================================
Installing:
 php-xml                                                 x86_64                                                 5.3.3-22.el6                                                      base                                                 103 k
Installing for dependencies:
 libxslt                                                 x86_64                                                 1.1.26-2.el6_3.1                                                  base                                                 452 k

Transaction Summary
============================================================================
Install       2 Package(s)

Total download size: 555 k
Installed size: 2.4 M
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 555 k
(1/2): libxslt-1.1.26-2.el6_3.1.x86_64.rpm                                                                                                                                                                            | 452 kB     00:02
(2/2): php-xml-5.3.3-22.el6.x86_64.rpm                                                                                                                                                                                | 103 kB     00:00
----------------------------------------------------------------------------

Total                                                                                                                                                                                                        166 kB/s | 555 kB     00:03
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : libxslt-1.1.26-2.el6_3.1.x86_64                                                                                                                                                                                           1/2
  Installing : php-xml-5.3.3-22.el6.x86_64                                                                                                                                                                                               2/2
  Verifying  : libxslt-1.1.26-2.el6_3.1.x86_64                                                                                                                                                                                           1/2
  Verifying  : php-xml-5.3.3-22.el6.x86_64                                                                                                                                                                                               2/2

Installed:
  php-xml.x86_64 0:5.3.3-22.el6

Dependency Installed:
  libxslt.x86_64 0:1.1.26-2.el6_3.1

Complete!
[root@lin wiki]# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
[root@lin wiki]#

Posted in PHP