Home  >  Article  >  Backend Development  >  php-config introduction

php-config introduction

不言
不言Original
2018-03-30 16:05:193435browse

Many times, after we compile and install PHP, we need to recompile and install it, but we can’t remember the original compilation parameters. We can easily re-obtain them through the php-config command. In addition, php-config has many others. Useful features.

Let’s introduce the other functions of php-config:

Option Description

-- prefix
Directory prefix where PHP is installed, e.g. /usr/local
The path of PHP installation, that is, the value of the prefix parameter for compilation and installation
-- includes
List of -I options with all include files
-- ldflags
LD Flags which PHP was compiled with
-- libs
Extra libraries which PHP was compiled with
External libraries used in compilation
-- extension-dir
Directory where extensions are searched by default
Extension storage directory. After pecl is compiled, you can go to this directory to view
-- include-dir
Directory prefix where header files are installed by default
Header file path
-- php-binary
Full path to php CLI or CGI binary
php binary executable file directory
-- php-sapis
Show all SAPI modules available
-- configure-options
Configure options to recreate configuration of current PHP installation
Parameters when compiling and installing php
-- version
PHP version
-- vernum
PHP version as integer

php-config is very useful when we recompile and install php or compile and install the pecl extension, because there may be many versions of php in the system at the same time, this command can help us accurately Locate the currently used version and accurately view PHP compilation and installation information.

Related recommendations:

The role of php-config in the PHP directory

##linux - How to find the php-config file

configure: error: Cannot find php-config.

The above is the detailed content of php-config introduction. 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