Bobcares

PECL XML extension not found- Solve it Quickly!

by | Oct 25, 2019

Is the “PECL XML extension not found” frustrating you?

PECL errors are common and tricky. And, this error mainly occurs due to the absence of XML extensions.

At Bobcares, we often receive requests to fix this error as part of our Server Management Services.

Today, let’s get into this error in detail and see how our Support Engineers fix it for the customers.

 

What is the PECL XML extension not found?

Have any idea about PECL? PECL stands for PHP Extension Community Library.

Actually, it is a repository for PHP extensions. We can download and install any PHP extension available from their repository.

Sometimes, we will not be able to download old PHP extensions from the Ubuntu repository. In such cases, we can download those extensions using PECL.

PECL contains XML codes. Sometimes, our PHP installation may not have XML enabled by default.

So, when we try to run PECL, it returns the error XML extension not found. 

 

How we fix the “XML extension Not Found” error?

So far we have discussed the main causes of this error. Now let’s see how our Support Engineers fix this error.

 

Missing XML extension

Recently, one of our customers approached us with a pecl error.

He has upgraded PHP to version 7. Then, he tried to install MongoDB using the below command.

sudo pecl install mongodb

But, it ended up showing the error XML extension Not Found.

Our Support Engineers checked and found out the root cause of this error. The XML extension was missing in his PHP installation.

So, we installed the XML extension of the current PHP version using the below command.

sudo apt-get install php-xml php7.0-xml

This resolved the error and then on PECL worked fine.

 

Bug in PECL

Similarly, some installations will have a bug in PECL.

PECL calls PHP with a number of flags before providing the path to the main PECL PHP script file. But, among these, error causing flags may also be present.

The -n option used by PECL tells PHP to ignore any php.ini file.

Therefore, it will not show any additional extensions like XML.

Removing the -n option, will show up the XML extensions and thus resolves the error.

 

[Need more assistance to solve this error?- We’re available 24/7 to help you.]

 

Conclusion

In short, the PECL XML extension not found mainly occurs due to missing XML extension, using incorrect flags, etc. In Today’s writeup, we discussed this error in depth and saw how our Support Engineers fix it for our customers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.