PHP module libxml not installed but php -m says it is

I am trying to install Nextcloud v22 and for some reason it is not detecting PHP libxml add in:

The NextCloud web page shows the following:

PHP module libxml not installed.

Please ask your server administrator to install the module.

PHP modules have been installed, but they are still listed as missing?

Please ask your server administrator to restart the web server.

However the output of “php -m” below:

# php -m
[PHP Modules]
Core
ctype
curl
date
dom
exif
fileinfo
filter
gd
hash
iconv
json
libxml
mbstring
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
Reflection
session
SimpleXML
SPL
standard
xmlreader
xmlwriter
zip
zlib

[Zend Modules]

I am using php-fpm:

# service php-fpm status
php_fpm is running as pid 22593.

Can anyone shed some light on this?

Hi Ben,
did you find the light? I ran into the very same error and couldn´t find a clue.

Best regards,

Mike

Hi @comcloudmi

Maybe the package libxml2 is not installed…?

PHP module libxml (Linux package libxml2 must be >=2.7.0)

https://docs.nextcloud.com/server/latest/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation

You can check with the following commands if it is installed…

Debian, Ubuntu…

apt list libxml2 

RedHat, CentOS etc…

dnf list libxml2

[Solved]
Hi folks,
thx for the replys but this doesn´t seem to be an php problem but more one of FreeBSD / trueNAS:
Until php 7.2 nextcloud was happy when php72-simplexml was installed. With php 7.4 something has changed - and I hadn´t any clue what but php74-simplexml doesn´t lead to success any more when it comes to run nextcloud but will list libxml as installed even with the right version. Additionally installing php74 xml with - pkg install php74-xml - fixes the issue.
Hope this helps somebody.

Best regards,

Mike

1 Like

Same issue with new FreeBSD 13 server and PHP 8 - Nextcloud reported “libxml not installed” on the login page. IIUC libxml is now built into core, and like the OP “php -m” showed libxml was loaded (also by phpinfo()).

Installing php80-xml fixed the issue.

ran into this issue also… installing php80-xml does make it move forward, however the installer doesn’t seem correct to me (missing the graphics)

Not sure what might be causing this…
image