DOMDocument not working

Forum for you who has PHP installation issues

Moderators: egami, macek, gesf

Post Reply
Cinder
New php-forum User
New php-forum User
Posts: 2
Joined: Tue Sep 28, 2021 2:02 pm

Tue Sep 28, 2021 2:09 pm

I installed apache, php, and mariadb on Ubuntu 20.04 LTS via the following commands:

sudo apt update
sudo apt install apache2
sudo apt install php
sudo apt install mariadb-server

For some reason DOMDocument doesn't work within php, which I figured would probably happen because I hadn't installed any php modules. However, phpInfo says libxml is installed. Any ideas what is going on here? Ultimately I'm trying to learn how to create and install production grade websites.


Thanks in advance! :D
Cinder
New php-forum User
New php-forum User
Posts: 2
Joined: Tue Sep 28, 2021 2:02 pm

Tue Sep 28, 2021 3:00 pm

Ok I guess libxml was not installed by default on apache2 on Ubuntu 20. Someone posted a note on the php website. Corrected it with the following:

sudo apt install php-xml


Cheers! :)
User avatar
RKaji
New php-forum User
New php-forum User
Posts: 1
Joined: Wed Aug 04, 2021 12:33 am

Fri Oct 08, 2021 1:50 am

The fix helped, thank you! :)
Post Reply