phpdismod
disables PHP extensions on Debian-based systems by removing the symbolic link
TLDR
SYNOPSIS
phpdismod [-v version] [-s sapi] module
DESCRIPTION
phpdismod disables PHP extensions on Debian-based systems by removing the symbolic link from the conf.d directory. Without version or SAPI specified, it disables the extension for all installed PHP versions and all SAPIs.The command works by manipulating 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). Use ALL for all versions.-s sapi
SAPI type (cli, fpm, apache2, cgi). Use ALL for all SAPIs.-q, --quiet
Suppress output messages.module
One or more extension names to disable.
CAVEATS
Debian/Ubuntu specific tool. Requires root privileges. Changes take effect after restarting PHP-FPM or Apache. Some extensions have dependencies that may cause issues when disabled.
HISTORY
phpdismod 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.
