/
/
Unable to activate xsl extension for PHP

Unable to activate xsl extension for PHP

Symptoms

When attempting to enable the “xsl” extension in the “PHP” - “Extensions” section, the following error occurs:

PHP Warning:  PHP Startup: Unable to load dynamic library 'xsl.so' (tried: /opt/php81/lib/php/modules/xsl.so 
(/opt/php81/lib/php/modules/xsl.so: undefined symbol: dom_node_class_entry), /opt/php81/lib/php/modules/xsl.so.so 
(/opt/php81/lib/php/modules/xsl.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0

Causes

The “xsl” extension loads before the “dom” extension required for the former to work.

Solution

In the settings of the target PHP version, disable and then enable again the “dom” extension, then enable the “xsl” extension.

In this article