List of core configure options

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.


These are only used at compile time. If you want to alter PHP's runtime configuration, please see the chapter on Runtime Configuration.

Configure Options in PHP

Misc options


Compile with debugging symbols.


Sets how installed files will be laid out. Type is one of PHP (default) or GNU.


Install PEAR in DIR (default PREFIX/lib/php).


Do not install PEAR.


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


Compile with memory limit support. (not available since PHP 5.2.1 - always enabled)


Disable the URL-aware fopen wrapper that allows accessing files via HTTP or FTP. (not available since PHP 5.2.5)


Export only required symbols. See INSTALL for more information.

PHP options


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.


Enable safe mode by default.


이 기능은 PHP 5.3.0부터 배제되어, PHP 5.4.0부터 제거됩니다.


Only allow executables in DIR when in safe mode defaults to /usr/local/php/bin.


이 기능은 PHP 5.3.0부터 배제되어, PHP 5.4.0부터 제거됩니다.


Enable magic quotes by default.


이 기능은 PHP 5.3.0부터 배제되어, PHP 5.4.0부터 제거됩니다.


Disable the short-form <? start tag by default.


Enables multibyte code in the language parser and scanner to be executed. When PHP is compiled with this option, it also enables the encoding directive in the declare construct.


이 기능은 PHP 5.3.0부터 배제되어, PHP 5.4.0부터 제거됩니다.


Specifies the directory where the libraries to build PHP exists on a Unix system. For 64bit systems, its needed to specify this argument to the lib64 directory like: --with-libdir=lib64.

SAPI options

The following list contains the available SAPI&s (Server Application Programming Interface) for PHP.


Specify path to the installed AOLserver.


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.


Build PHP as a Pike module for use with Caudium. DIR is the Caudium server dir, with the default value /usr/local/caudium/server.


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 in PHP 5.6.x or later.


Enable building of the embedded SAPI library. TYPE is either shared or static, which defaults to shared.


Build PHP as an ISAPI module for use with Zeus.


Specify path to the installed Netscape/iPlanet/SunONE Webserver.


No information yet.


Build PHP as a module for use with Pi3Web.


Build PHP as a Pike module. DIR is the base Roxen directory, normally /usr/local/roxen/server.


Build the Roxen module using Zend Thread Safety.


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.


Build PHP as thttpd module.


Build PHP as a TUX module (Linux only).


Build PHP as a WebJames module (RISC OS only)


Disable building CGI version of PHP.

As of PHP 5.3.0 this argument enables FastCGI which previously had to be enabled using --enable-fastcgi.


Enable the security check for internal server redirects. You should use this if you are running the CGI version with Apache.

As of PHP 5.3.0 this argument is enabled by default and no longer exists. To disable this, the cgi.force_redirect ini directive should be set to 0.


If this is enabled, the PHP CGI binary can safely be placed outside of the web tree and people will not be able to circumvent .htaccess security.

As of PHP 5.3.0 this argument is disabled by default and no longer exists. To enable this feature the cgi.discard_path ini directive must be set to 1.


If this is enabled, the CGI module will be built with support for FastCGI also.

As of PHP 5.3.0 this argument no longer exists and is enabled by --enable-cgi instead.


If this is disabled, paths such as /info.php/test?a=b will fail to work. For more information see the » Apache Manual.

add a note add a note

User Contributed Notes 2 notes

atesin () gmail ! com
2 years ago
i'll answer myself (FINALLY!)

current "configure options" can be viewed with "php-config" shell script, aside with other compile time options too =D!!! ...

in some distributions it comes with the "php-devel" package... but until in this online manual "php-config" is mentioned in pecl extensions documentation (i couldn't find on pecl site), idk if that "php-devel" has something to do with this

... however i noticed they are literal strings inside the script, i hope the script itself were built together with php compilation o_O

in the previous page "configure options" (link shown above ^), there is an editor note with additional info about it
atesin () gmail ! com
2 years ago
please somebody tell me how to display configure options used in php actual binary

it was shown in phpinfo() some years before, it was very useful, specially with 'phpize' recompilation and to enable some pecl/pear module :/

please tell me also which ctriteria had php guys used to suddenly decided to hide (or obfuscate) this info :/

thanks in advance
To Top