返回命令列表

Linux command

phpenmod 命令

安全

May affect permissions or system state. Check the target first.

命令示例

Enable

sudo phpenmod [extension]

Example

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

说明

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.

参数

-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

FAQ

What is the phpenmod command used for?

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.

How do I run a basic phpenmod example?

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

What does -v _version_ do in phpenmod?

PHP version (e.g., 7.4, 8.0, 8.1)