Below is a partial list of configure options used by the PHP
configure scripts when compiling in Unix-like
environments. Most configure options are listed in their appropriate
locations on the extension reference pages and not here. For a complete
up-to-date list of configure options, run ./configure --help
in your PHP source directory after running autoconf
(see also the Installation chapter).
You may also be interested in reading the
» GNU configure documentation for
information on additional configure options such as
--prefix=PREFIX.
Nota:
These are only used at compile time. If you want to alter PHP's runtime configuration, please see the chapter on Runtime Configuration.
Compile with debugging symbols.
Sets how installed files will be laid out. Type is one of PHP (default) or GNU. Note that if installing manpages under PREFIX (default), choose the GNU style in order for them to be found in the search path of manpath utility.
Install PEAR in DIR (default PREFIX/lib/php).
Do not install PEAR.
Use POSIX per-thread timers for
max_execution_time
tracking instead of the process-wide
setitimer(). These timers measure elapsed time
(CLOCK_BOOTTIME, or
CLOCK_MONOTONIC on FreeBSD), whereas the default
setitimer(ITIMER_PROF) measures CPU time, so time
spent sleeping or waiting on I/O counts towards the limit.
Requires timer_create() support: available on
Linux, and on FreeBSD as of PHP 8.4.0.
Available since PHP 8.1.0. Enabled by default for ZTS builds since
PHP 8.3.0.
Enable PHP's own SIGCHLD handler.
Disable passing additional runtime library search paths.
Enable explicitly linking against libgcc.
Include experimental PHP streams. Do not use unless you are testing the code!
Define the location of zlib install directory.
Use POSIX threads (default).
Build shared libraries [default=yes].
Build static libraries [default=yes].
Optimize for fast installation [default=yes].
Assume the C compiler uses GNU ld [default=no].
Avoid locking (might break parallel builds).
Try to use only PIC/non-PIC objects [default=use both].
Export only required symbols. See INSTALL for more information.
Enable make rules and dependencies not useful (and sometimes confusing) to the casual installer.
Sets the path in which to look for php.ini, defaults to PREFIX/lib.
Disable the short-form <? start tag by default.
Specifies the directory where the libraries to build PHP exist on a
Unix system. For 64bit systems, its needed to specify this argument
to the lib64 directory like:
--with-libdir=lib64.
Enables thread safety. Prior to PHP 8.0.0 on non-Windows systems, the option was called --enable-maintainer-zts.
The following list contains the available SAPI&s (Server
Application Programming Interface) for PHP.
Build shared Apache module. FILE is the optional pathname to the Apache apxs tool; defaults to apxs. Make sure you specify the version of apxs that is actually installed on your system and NOT the one that is in the apache source tarball.
Build a static Apache module. DIR is the top-level Apache build directory, defaults to /usr/local/apache.
Enable transfer tables for mod_charset (Russian Apache).
Build shared Apache 2.0 module. FILE is the optional pathname to the Apache apxs tool; defaults to apxs.
Disable building the CLI version of PHP (this forces --without-pear). More information is available in the section about Using PHP from the command line.
Enable phpdbg interactive debugger SAPI module support.
Enable building of the embedded SAPI library. TYPE is either
shared or static, which
defaults to shared.
Include servlet support. DIR is the base install directory for the JSDK. This SAPI requires the java extension must be built as a shared dl.
Disable building CGI version of PHP.
This argument also enables FastCGI.