/
/
The default PHP extension is not displayed

The default PHP extension is not displayed

Symptoms

In the ispmanager 6 panel, the PHP settings don't show an extension included in the standard build.

The extension is also missing from the list when queried with the command:

php -m #for native PHP version
/opt/phpXX/bin/php -m #for alternative PHP versions

Causes

An extension file has a looped symbolic link. For example, this is what the posix extension for alternative PHP version 7.3 looks like with a looped symbolic link:

# cat /opt/php73/etc/mods-available/posix.ini
lrwxrwxrwx 1 root root 39 Dec 19  2024 /opt/php73/etc/php.d/20-posix.ini -> /opt/php73/etc/mods-available/posix.ini

Solution

Change the contents of the PHP extension INI file in the /etc/php/XX/mods-available/ directory (/opt/phpXX/etc/mods-available/ for alternative PHP versions) to the following:

extension=%EXTENSION_NAME%.so

For example, for the posix extension and an alternative PHP version 7.3, the content would be the following:

extension=posix.so

In this article