Asked 4 years, 3 months ago
Viewed 17k times
I've started using a library that requires xmlwriter PHP extension, and it seems like it is not installed on my server.
How can I install it?
I tried this:
sudo yum install libxml2
but the result is:
There are no enabled repos.
Is there another way to install it, for example using apt-get? Or how can I install it?
asked Jun 8, 2018 at 2:21
I did it with:
sudo apt-get install php-xml
sudo service apache2 restart
This confirms xmlwriter is installed:
php -i | grep "xml"
answered Jun 8, 2018 at 2:28
The package manager yum
is not used on debian distros like Ubuntu. It's used on Fedora and RHEL. :]
What @user838550 wrote should work. If you've got 5.6 running use sudo apt install php5.6-xml
answered Sep 24, 2018 at 6:10
KlausKlaus
1213 bronze badges
I had same problem while moving to new server:
1] Check that libxml installed:
php -i | grep "xml"
Result example:
1 /etc/php.d/xmlreader.ini,
2 /etc/php.d/xmlwriter.ini,
3 xmlrpc_error_number => 0 => 0
4 xmlrpc_errors => Off => Off
5 libxml
6 mbstring.http_output_conv_mimetypes => ^[text/|applicatio...
7 Simplexml support => enabled
8 xml
9 libxml2 Version => 2.7.6
10 xmlwriter
Lines 5, 9 & 10 told us that all ok.
2] If not installed [example for CentOS]:
yum install libxml2
and restart server:
/etc/apache2 restart
or php-fpm:
/etc/php-fpm restart
maybe will useful next variants:
yum install php-xmlwriter
yum install php-xml
For php from sources in latest versions xmlwriter
enabled by default, but you can check, that key --disable-xmlwriter
not set.
3] Last step - file:
/etc/php.d/xmlwriter.ini
Needing to be look like:
; Enable xmlwriter extension module
extension=xmlwriter.so
I think latest string - it's main decition for the problem.
Question
when i installed wp all import plugin, it gave me this error: " Required PHP components are missing.
WP All Import requires DOMDocument, XMLReader, and XMLWriter PHP modules to be installed. These are standard features of PHP, and are necessary for WP All Import to read the files you are trying to import. Please contact your web hosting provider and ask them to install and activate the DOMDocument, XMLReader, and XMLWriter PHP modules."
how can i solve this?
Submit an answer
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Sign In or Sign Up to Answer
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Asked 4 years, 3 months ago
Viewed 17k times
I've started using a library that requires xmlwriter PHP extension, and it seems like it is not installed on my server.
How can I install it?
I tried this:
sudo yum install libxml2
but the result is:
There are no enabled repos.
Is there another way to install it, for example using apt-get? Or how can I install it?
asked Jun 8, 2018 at 2:21
I did it with:
sudo apt-get install php-xml
sudo service apache2 restart
This confirms xmlwriter is installed:
php -i | grep "xml"
answered Jun 8, 2018 at 2:28
The package manager yum
is not used on debian distros like Ubuntu. It's used on Fedora and RHEL. :]
What @user838550 wrote should work. If you've got 5.6 running use sudo apt install php5.6-xml
answered Sep 24, 2018 at 6:10
KlausKlaus
1213 bronze badges
Submit a Pull Request Report a Bug
The XMLWriter ships with PHP source. This extension is enabled by default. It may be disabled by using the following option at compile time: --disable-xmlwriter
+add a note
User Contributed Notes
There are no user contributed notes for this page.
Quick Install Instructions of php-xmlwriter on Ubuntu Server. It’s Super Easy! simply click on Copy button to copy the command and paste into your command line terminal using built-in APT package manager.
See below for quick step by step instructions of SSH commands, Copy/Paste to avoid miss-spelling or accidently installing a different package.
Quick Install Steps:Step 1
Step 2
sudo apt-get install -y php-xmlwriter
Step 3
Check the system logs to confirm that there are no related errors. You can use ZoomAdmin to check the logs, manager servers, host multiple websites and apps on your servers and more. The apps run in docker containers, to learn more
see ZoomAdmin Features for list of features and demo videos. And you can start with the Free Plan.
Execute the commands above step by step. You can simply hit the copy button to copy the command and paste into the command line interface.
Note: -y flag means to assume yes and silently install, without asking you questions in most cases.
Run update command to update package repositories and get latest package information.
Step 2Run the install command with -y flag to quickly install the packages and dependencies.
sudo apt-get install -y php-xmlwriter
Check the system logs to confirm that there are no related errors. You can use ZoomAdmin to check the logs, manager servers, host
multiple websites and apps on your servers and more. The apps run in docker containers, to learn more
see ZoomAdmin Features for list of features and demo videos. And you can start with the Free Plan.