phpenmod
enables PHP extensions on Debian-based systems by creating symbolic
TLDR
Enable extension for all PHP versions and SAPIs
SYNOPSIS
phpenmod [-v version] [-s sapi] module
DESCRIPTION
phpenmod enables PHP extensions on Debian-based systems by creating symbolic links in the conf.d directory pointing to module configuration files. Without version or SAPI specified, it enables the extension for all installed PHP versions and all SAPIs.
The command creates symlinks in /etc/php/VERSION/SAPI/conf.d/ that point to module configuration files in mods-available.
PARAMETERS
-v _version_
PHP version (e.g., 7.4, 8.0, 8.1)-s _sapi_
SAPI type (cli, fpm, apache2, cgi)module
Extension name to enable
CAVEATS
Debian/Ubuntu specific tool. Requires root privileges. Changes take effect after restarting PHP-FPM or Apache. Extension must be installed before it can be enabled.
HISTORY
phpenmod is part of the php-defaults package maintained by the Debian PHP team. It provides a standardized way to manage PHP extensions, similar to how a2enmod/a2dismod manage Apache modules.
