Home >Backend Development >PHP Problem >Check what php components are in the linux system

Check what php components are in the linux system

Barbara Streisand
Barbara StreisandOriginal
2023-08-10 13:41:491277browse

How to check the PHP components in the Linux system: 1. Use the apt command, "sudo apt update"; 2. Use the yum command, "sudo yum list installed | grep php"; 3. Use dpkg command, "dpkg -l | grep php"; 4. Use the rpm command, "rpm -qa | grep php"; 5. Use the php command, "php -m", etc.

Check what php components are in the linux system

#The operating environment of this article: linux6.4.3 system, PHP8.1.3 version, Dell G3 computer.

To see what PHP components are in a Linux system, you first need to understand the package management tools in the Linux system.

1. Use apt command (applicable to Debian and Ubuntu systems):

Run the following command in the terminal:

sudo apt update
sudo apt list --installed | grep php

This will list all installed include " php" keyword package.

2. Use the yum command (applicable to CentOS and Fedora systems):

Run the following command in the terminal:

sudo yum list installed | grep php

This will list all installed include " php" keyword package.

3. Use the dpkg command (applicable to Debian and Ubuntu systems):

Run the following command in the terminal:

dpkg -l | grep php

This will list all files starting with "php" software package.

4. Use the rpm command (applicable to CentOS and Fedora systems):

Run the following command in the terminal:

rpm -qa | grep php

This will list all files starting with "php" software package.

5. Use the php command:

Run the following command in the terminal:

php -m

This will list all extension modules that PHP has loaded.

With the above command, we can list the installed PHP components and extension modules. Some common PHP components and extension modules include:

php-common: PHP's shared library and basic files.

php-cli: PHP command line interface.

php-fpm: PHP FastCGI process manager.

php-mysql: Module for interacting with MySQL database.

php-gd: Module for processing images.

php-curl: Module for handling URLs and network requests.

php-xml: Module for processing XML data.

php-mbstring: Module for processing multi-byte strings.

php-zip: Module for processing ZIP files.

php-intl: Module for internationalization and localization.

php-opcache: Module for caching and optimizing PHP code.

Please note that specific components and extension modules may vary between different Linux distributions and PHP versions. The above only lists some common components and modules. You can install and view them according to your needs.

The above is the detailed content of Check what php components are in the linux system. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn