LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

phpdismod

disables PHP extensions on Debian-based systems by removing the symbolic link

TLDR

Disable extension for all PHP versions and SAPIs
$ sudo phpdismod [extension]
copy
Disable extension for specific version and SAPI
$ sudo phpdismod -v [7.4] -s [cli] [extension]
copy

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.

SEE ALSO

phpenmod(8), phpquery(8), php(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid