Web Development

I have been working with PHP again for the good part of 2014 and I just encountered this error in my error_log file. A trivial issue by any means.

This can be solved by installing the php-xml extension.


sudo apt-get install php-xml


sudo yum install php-xml

A nice installation log will follow:

sudo yum install -y php-xml
Failed to set locale, defaulting to C
Loaded plugins: amazon-id, rhui-lb, security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-xml.x86_64 0:5.4.23-29.el6.art will be installed
--> Finished Dependency Resolution

Dependencies Resolved

 Package                            Arch                              Version                                        Repository                         Size
 php-xml                            x86_64                            5.4.23-29.el6.art                              atomic                            169 k

Transaction Summary
Install       1 Package(s)

Total download size: 169 k
Installed size: 622 k
Downloading Packages:
php-xml-5.4.23-29.el6.art.x86_64.rpm                                                                                                  | 169 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : php-xml-5.4.23-29.el6.art.x86_64                                                                                                          1/1 
  Verifying  : php-xml-5.4.23-29.el6.art.x86_64                                                                                                          1/1 

  php-xml.x86_64 0:5.4.23-29.el6.art                                                                                                                         


Restart the Server

Whenever you install something, it’s a good practices to restart.

sudo service httpd restart
[user@yourvps ~]$ sudo service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                     [  OK  ]