Some core compiler options for PHP

Source: Internet
Author: User
Tags deprecated pear php source code sapi zts zend

Transferred from: http://cn2.php.net/manual/zh/configure.about.php

Note that some common configuration parameters are discarded or removed by alternative options

--with-libdir=name set in/name Find library instead of looking for library in default/lib directory
--enable-fastcgi PHP 5.3.0, this parameter no longer exists and is replaced with--enable-cgi. FastCGI support in CGI SAPI is always turned on and cannot be closed, http://cn2.php.net/manual/zh/migration53.sapi.php
--ENABLE-CGI//Is this parameter removed? I didn't find it in 5.5. Then why did you say--with-fastcgi was replaced by enable-cgi?
--enable-force-cgi-redirect is valid by default and no longer has a secondary option
--enable-discard-path is deprecated. The PHP CGI directory can be safely placed outside the web directory tree, and people cannot avoid it. htaccess security restrictions. PHP 5.3.0, the default disable does not exist. To enable this feature, set the cgi-redirect INI directive to 1.
--disable-path-info-check If this option is disabled, paths such as/info.php/test?a=b form will not work
--enable-debug compilation with Debug symbols
--with-config-file-path php.ini File Location
--enable-safe-mode security mode is enabled by default. This feature has been deprecated since PHP 5.3.0 and will be removed from PHP 5.4.0.
--WITH-EXEC-DIR[=DIR] in Safe mode, only executable files are allowed in the Dir directory. The default directory is/usr/local/php/bin. This feature has been deprecated since PHP 5.3.0 and will be removed from PHP 5.4.0.
--enable-magic-quotes Enable Magic quotes. This feature has been deprecated since PHP 5.3.0 and will be removed from PHP 5.4.0.
--disable-short-tags disables the short form of the start tag <?. 5

List of core configuration options ¶

The following is a list of some of the options that PHP configure scripts use to compile the Unix-like environment. Most of the configuration options are listed in the appropriate location on the Extension reference page, not here. To see a list of all available configuration options, run the autoconf command in the PHP source code directory after running the ./configure--help (see Chapter Installation and Configuration). You can also read the»gnu configure documentation for more detailed information about the Configure command, such as --prefix=prefix.

Note:

These options are only used at compile time. If you want to modify your PHP runtime configuration, read the runtime configuration.

    • Miscellaneous
    • PHP behavior
    • Server
PHP configuration Options ¶ Miscellaneous Options ¶
--enable-debug

Debug symbols are added at compile time.

--with-layout=type

Sets the layout of the files being installed. TYPE is PHP (default) or GNU.

--with-pear=dir

Install PEAR in DIR (default = prefix/lib/php).

--without-pear

Do not install PEAR.

--enable-sigchild

Use the SIGCHLD processor that comes with PHP.

--disable-rpath

Disables passing other runtimes in the search path.

--enable-libgcc

Enables precise linking of LIBGCC.

--enable-php-streams

Contains the experimental PHP stream. Do not use this option unless you are testing the code!

--with-zlib-dir[=dir]

Defines the installation directory for the zlib.

--with-tsrm-pthreads

Use POSIX threads (default).

--ENABLE-SHARED[=PKGS]

Compile the shared library [Default=yes].

--ENABLE-STATIC[=PKGS]

Compile the static library [Default=yes].

--ENABLE-FAST-INSTALL[=PKGS]

Optimized for quick installation [Default=yes].

--with-gnu-ld

Suppose the C compiler uses the GNU ld [Default=no].

--disable-libtool-lock

Avoid locking (possibly destroying parallel compilations).

--with-pic

Try using only pic/non-PIC objects [default=use both].

--enable-memory-limit

Compile memory limit support features. (from PHP 5.2.1 start unavailable, default enable)

--disable-url-fopen-wrapper

Disables the Fopen encapsulation protocol in the form of URLs. This protocol allows access to files via HTTP or FTP. (Not available from PHP5.2.5 start)

--enable-versioning

Only the required symbols are exported. View the INSTALL file for more information.

PHP Options ¶
--enable-maintainer-mode

Enable this option for accidental installation, so that compilation rules and dependencies are not checked.

--with-config-file-path=path

php.inithe search path to set. The default is Prefix/lib.

--enable-safe-mode

Security mode is enabled by default.

Warning

This feature has been deprecated since PHP 5.3.0 and will be removed from PHP 5.4.0.

--with-exec-dir[=dir]

In safe mode, only the DIR directory is allowed to execute. The default directory is/usr/local/php/bin.

Warning

This feature has been deprecated since PHP 5.3.0 and will be removed from PHP 5.4.0.

--enable-magic-quotes

Magic Quotes is enabled by default.

Warning

This feature has been deprecated since PHP 5.3.0 and will be removed from PHP 5.4.0.

--disable-short-tags

The default is to disable the short form of the start tag <?.

--enable-zend-multibyte

Multi-byte encoding is allowed to be performed during lexical and syntactic parsing. If you use this option when compiling PHP, you can use the encoding directive in the declare structure.

Warning

This feature has been deprecated since PHP 5.3.0 and will be removed from PHP 5.4.0.

--with-libdir

Specifies that the Uxin system library file directory is used to build PHP. For 64-bit systems, you need to specify the LIB64 directory, such as --with-libdir=lib64

SAPI Options ¶

The following list contains SAPI ( server application programming interfaces ) available for PHP.

--with-aolserver=dir

Specifies the installation path for the Aolserver.

--with-apxs[=file]

Compile the shared Apache module. FILE is the path to the optional Apache Apxs tool, which points to apxs by default. Verify that the specified APXS is already installed on the server, and that it is not the APXS in the Apache source package.

--with-apache[=dir]

Compile the static Apache module. DIR is the top level of the Apache compiled directory, which defaults to /usr/local/apache .

--with-mod_charset

Enable Mod_charset conversion table (Apache use in Russian).

--with-apxs2[=file]

Compile the Shared Apache 2.0 module. FILE is the path to the optional Apache Apxs tool, which points to apxs by default.

--with-caudium=dir

Compile PHP for a Pike module using Caudium. DIR is the Caudium server directory, which defaults to /usr/local/caudium/server .

--disable-cli

The version after PHP 4.3.0 is valid. It is forbidden to compile the CLI version of PHP (using it will also force the--without-pear option). For more information, please refer to PHP's command-line mode.

--enable-embed[=type]

Enables compiling the embedded SAPI library. The TYPE is either shared or static, which is sharedby default. The version after PHP 4.3.0 is valid.

--with-fhttpd[=dir]

Compile the FHTTPD module. DIR is the FHTTPD source code directory, which defaults to /usr/local/src/fhttpd . PHP 4.3.0 and later versions this option is no longer valid.

--with-isapi=dir

Compile PHP as an ISAPI module for the Zeus server.

--with-nsapi=dir

Specifies the installation directory for the Netscape/iplanet/sunone.

--with-phttpd=dir

There is no information yet.

--with-pi3web=dir

Compile the PHP module for the Pi3web server.

--with-roxen=dir

Compile PHP in Pike module mode. DIR is the root directory of the Roxen, and the default is /usr/local/roxen/server .

--enable-roxen-zts

Compile the Roxen module with Zend thread Safety (ZTS).

--with-servlet[=dir]

Contains servlet support. DIR is the installation directory for JSDK. This SAPI requires that the Java extension be compiled into PHP as a shared module.

--with-thttpd=srcdir

Compile PHP for the THTTPD module.

--with-tux=moduledir

Compile PHP for the TUX module (only valid under Linux).

--with-webjames=srcdir

Compile PHP as Webjames module (only available in RISC OS).

--disable-cgi

Suppresses the compilation of CGI versions of PHP. The version after PHP 4.3.0 is valid.

PHP5.3.0, this option enables fastcgi, and in the past, fastcgi must be enabled using --enable-fastcgi .

--enable-force-cgi-redirect

Enable security detection for internal server redirection. If you are using the CGI version of PHP under Apache, enable this option.

PHP 5.3.0, the default is valid and no longer exists. To disable this feature, set the cgi.force_redirect INI directive to 0.

--enable-discard-path

If this option is enabled, the PHP CGI directory can be safely placed outside the web directory tree, where people cannot circumvent .htaccess security restrictions.

PHP 5.3.0, the default disable does not exist. To enable this feature, set the cgi-redirect INI directive to 1.

--enable-fastcgi

If enabled, the CGI module will be compiled to support FastCGI. The version after PHP 4.3.0 is valid.

PHP 5.3.0, this parameter no longer exists and is replaced with --enable-cgi .

--disable-path-info-check

If this option is disabled, for example, /info.php/test?a=b the path of the form will not work. The version after PHP 4.3.0 is valid. Please refer to the»apache Manual for more information.

Some core compiler options for PHP

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.