Imagick and Sodium not detected

I have installed both imagemagick and sodium but the Admin → Overview page says they are not installed

# php -m
[PHP Modules]

Nextcloud 23.0.4
CentOS Stream 8
Apache 2.4.37
PHP 7.4.30

The output of your Apache/nginx/system log in /var/log/____:

[Tue Aug 09 12:22:00.373800 2022] [autoindex:error] [pid 715667:tid 140467031238400] [client] AH01276: Cannotserve directory /var/www/html/: No matching DirectoryIndex (index.html,index.php) found, and server-generated directory index forbidden by Options directive
[Tue Aug 09 12:22:00.373875 2022] [core:error] [pid 715667:tid 140467031238400] [client] AH00037: Symbolic link not allowed or link target not accessible: /usr/share/httpd/noindex/index.html```

PHP uses two kinds of implementation, a WEB and a CUI one. The displayed error message is referring to the module missing in the PHP WEB environment, you’ve checked the PHP CUI environment which seems to be configured in the correct way.

Make sure that the module is also loaded in the PHP WEB environment and the error message should disappear.

Please also check if you do have multiple php versions installed, like 7.4 with sodium and 8.0 without or something like that.