[Solved] Fatal error: Class ‘XSLTProcessor’ not found

When you run a PHP file, you see the following error message:

Fatal error: Class 'XSLTProcessor' not found

Fatal error: Class XSLTProcessor not found

Cause

The PHP file requires XSL extension which isn’t enabled on your web server.

Solution to fix “Fatal error: Class ‘XSLTProcessor’ not found”

Install the XSL extension and restart your web server service.
Note: don’t forget to restart your web server service (e.g. Apache, IIS) after you made changes.

If you use XAMPP on Windows, edit php.ini (default location is C:\xampp\php). Then, search for the text below:

extension=php_xsl.dll

If there is already the text in file, remove a semi-colon (‘;’) in front of it and save the file.
If you don’t find the text, simply add it (better next to other extension texts) as the figure below and save the file.
php.ini - extension=php_xsl.dll

On Linux, execute this command to install XSL entension.

apt-get install php5-xsl

3 Comments

  1. samad rahman February 9, 2018
  2. Jinan April 3, 2018
  3. Phan April 29, 2018

Leave a Reply