Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I enable the DOM extension in the php.ini

How do I enable the DOM extension in my php.ini file? I am running a Wordpress site and getting a message "Please enable the DOM extension in your PHP configuration".

Do I need to edit the wp-config file or php.ini

like image 666
Steve Bell Avatar asked May 18 '17 10:05

Steve Bell


People also ask

How do I enable PHP extensions in Windows?

On Windows, you have two ways to load a PHP extension: either compile it into PHP, or load the DLL. Loading a pre-compiled extension is the easiest and preferred way. To load an extension, you need to have it available as a ". dll" file on your system.

What is PHP DOM extension?

The DOM extension allows you to operate on XML documents through the DOM API with PHP. Note: The DOM extension uses UTF-8 encoding. Use mb_convert_encoding(), UConverter::transcode(), or iconv() to handle other encodings.


1 Answers

You need to install php-xml

and then add

extension=dom.so 

to the php.ini file.

docs in php.net

Please note that the extension is enabled by default. It might be disabled because of the following option: --disable-dom

like image 94
Davit Tovmasyan Avatar answered Oct 03 '22 21:10

Davit Tovmasyan