Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

How to Install the PECL Module XMLDiff in WHM

This guide shows you how to add the XMLDiff PHP extension to your server from WHM.

WHM2 min read13 steps5 screenshots

This guide needs root access. Root is the main admin login. VPS and dedicated server owners have it.

What is PECL and XMLDiff?

PHP is a language that runs many websites. An extension is an add-on that gives PHP a new skill. PECL is a big shelf of these add-ons. XMLDiff is one of them. It compares two XML files and shows what changed. XML is a way of writing data using tags, like a simple form.

Few sites need it. Install it only if your script asks for it.

Before you start

  • Take a backup or a server snapshot. A bad extension can break PHP.
  • Know which PHP version your site uses. With cPanel you can have several versions at once.
  • XMLDiff may need developer files for XML libraries. If the install fails, the error message names what is missing.

Steps in WHM

  1. Log in to WHM as root.
    Screenshot: Log in to WHM as root.
  2. Type Module Installers in the search box.
    Screenshot: Type Module Installers in the search box.
  3. Open Module Installers under the Software menu.
  4. Find PHP Pecl and click Manage.
    Screenshot: Find PHP Pecl and click Manage .
  5. In the search box, type xmldiff.
  6. Click Go.
  7. Click Install next to the result.
  8. Wait for the log to finish. Read the last lines to check that it says success.

Steps with SSH

  1. Log in to the server by SSH as root.
  2. Run this command.
    pecl install xmldiff
    It downloads, builds and installs the extension.
  3. Restart your web server so PHP loads it.

Check that it works

  1. Search WHM for MultiPHP INI Editor.
  2. Check that extension=xmldiff.so appears, or run php -m | grep xmldiff in SSH.
    Screenshot: Check that extension=xmldiff.so appears, or run php -m | grep xmldiff in SSH.
Tip: If the command prints xmldiff, the extension is loaded.

Troubleshooting

  • If the build stops with a missing file error, install the developer package it names.
  • If PHP does not show the extension, you may have installed it for another PHP version.
  • Ask Hostvento support if you are on shared hosting, since you cannot add extensions yourself.

Quick recap

  • PECL is a shelf of PHP add-ons. XMLDiff compares XML files.
  • Install it from Module Installers or with pecl install xmldiff.
    Screenshot: Install it from Module Installers or with pecl install xmldiff .
  • Restart the web server and check the extension loaded.