← 返回命令列表

Linux command

phpdismod 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Disable

sudo phpdismod [extension]

Example

sudo phpdismod -v [7.4] -s [cli] [extension]

说明

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.

参数

-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.

FAQ

What is the phpdismod command used for?

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.

How do I run a basic phpdismod example?

Run `sudo phpdismod [extension]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -v _version_ do in phpdismod?

PHP version (e.g., 7.4, 8.0, 8.1). Use ALL for all versions.