Home  >  Article  >  Backend Development  >  PHP compilation configuration detailed options_PHP tutorial

PHP compilation configuration detailed options_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:39:59866browse

Regarding detailed options, in addition to the installation introduction, other options can also be added during compilation.

apache module

Syntax: --with-apache=DIR

Description: Use this option to enable PHP to be used as an apache module. The DIR string can be /usr/local/apache or other directories where apache is installed

Example: --with-apache=/var/lib/apache

 fhttpd server module

Syntax: --with-fhttpd=DIR

 Note: If you use fttpd server, you can use this command to compile PHP. Using modules to cooperate with the fttpd server can achieve better efficiency.

Adabas D database

Syntax: --with-adabas=DIR

 Note: This option is required when the database system is Adabas D database. For details on the Adabas D database, please refer to http://www.adabas.com.

Example: --with-adabas=/usr/local/adabasd

 dBase data sheet

Syntax: --with-dbase

 Note: As long as this option is added, without other parameters or function libraries, PHP will allow the system to access the dBase data table.

 filePro database

Syntax: --with-filepro

 Note: You can read the filePro database (read-only) without specifying the database path and other function libraries.

mSQL database

Syntax: --with-msql=DIR

 Description: Provides access to mSQL database. For more details please refer to the mSQL website at http://www.hughes.com.au.

Example: --with-msql=/usr/local/Hughes

 MySQL database

Syntax: --with-mysql=DIR

Description: Provides access to MySQL database. For more details, please refer to the MySQL website http://www.tcx.se.

Example: --with-mysql=/usr/local/mysql

iODBC database device

Syntax: --with-iodbc=DIR

 Description: Provides an ODBC database device for accessing the back-end database. For more details, please refer to the iODBC website at http://www.iodbc.org.

Example: --with-iodbc=/usr/local/iodbc

OpenLink ODBC database device

Syntax: --with-openlink=DIR

 Description: Use the OpenLink ODBC database device to access the back-end database. For more details, please refer to the OpenLink ODBC website at http://www.openlinksw.com.

Example: --with-openlink=/usr/local/openlink

Oracle Database

Syntax: --with-oracle=DIR

 Instructions: Use Oracle database. The Oracle version must be version 7.3 or above. You can also use the environment variable ORACLE_HOME in your PHP program to specify the path to Oracle. For more information about Oracle, please refer to Oracle's website at http://www.oracle.com.

Example: --with-oracle=/export/app/oracle/product/7.3.2

PostgreSQL database

Syntax: --with-pgsql=DIR

 Instructions: Use PostgreSQL database. For more information about PostgreSQL, please refer to the PostgreSQL website http://www.postgreSQL.org or the Taiwan Mirror station http://postgresql.ccit.edu.tw.

Example: --with-pgsql=/usr/local/pgsql

Solid database

Syntax: --with-solid=DIR

 Instructions: Use Solid database. For more information about Solid, please refer to Solid's website at http://www.solidtech.com.

Example: --with-solid=/usr/local/solid

 Sybase Database

Syntax: --with-sybase=DIR

 Instructions: Use Sybase database. For more information about Sybase, please refer to the Sybase website at http://www.sybase.com.

Example: --with-sybase=/home/sybase

 Sybase-CT database

Syntax: --with-sybase-ct=DIR

 Description: Use Sybase-CT database.

Example: --with-sybase-ct=/home/sybase

Velocis Database

Syntax: --with-velocis=DIR

 Instructions: Use Velocis database. For further information on the Velocis database please refer to Raima's website at http://www.raima.com.

Example: --with-velocis=/usr/local/velocis

Customized ODBC database driver

Syntax: --with-custom-odbc=DIR

 Description: Use custom ODBC function library. Of course, you must specify the CUSTOM_ODBC_LIBS and CFLAGS variables when using this method. For example, when using Sybase SQL Anywhere on a QNX machine, you may need to configure the system environment variables CFLAGS=-DODBC_QNX, LDFLAGS=-lunix and CUSTOM_ODBC_LIBS="-ldblib -lodbc", and add --with-custom-odbc=/ to the PHP configuration. usr/lib/sqlany50

Example: --with-custom-odbc=/usr/local/odbc

Does not use ODBC database driver

Syntax: --disable-unified-odbc

 Note: Using this option will disable all ODBC database drivers. This option does not need to specify a path, and the options affected by this option are --with-iodbc, --with-solid, --with-adabas, --with-velocis and --with-custom-odbc.

 LDAP Directory Protocol

Syntax: --with-ldap=DIR

 Note: If you want to use the Directory Protocol (Lightweight Directory Access Protocol, LDAP), you must turn on this option. For details about LDAP, please refer to the RFC documents RFC1777 and RFC1778.

Example: --with-ldap=/usr/local/ldap.

 mcrypt encoding function library

Syntax: --with-mcrypt=DIR

 Note: After installing the mcrypt function library, you can add this option when compiling PHP so that the program can use the encoding and decoding function.

Example: --with-mcrypt=/usr/local/include

 Sys V signal

Syntax: --enable-sysvsem

 Note: To use SysV’s semaphores mechanism, you need to turn on this option.

XML support

Syntax: --with-xml

 Note: Turn this option on to support the XML parsing library written by James Clarks.

Maintenance Mode

Syntax: --enable-maintainer-mode

 Note: This option is generally not turned on unless it is useful for PHP developers.

Regular expression library

Syntax: --with-system-regex

 Note: If you need additional regular expression functions, you can add this option.

PHP configuration file

Syntax: --with-config-file-path=DIR

 Description: Used to specify the path of php3.ini or php4.ini for use during PHP initialization.

Example: --with-config-file-path=/usr/local/lib

PHP execution path

Syntax: --with-exec-dir=DIR

Note: Sometimes for the sake of system security, the directory in which the PHP program must be executed is specified.

Example: --with-exec-dir=/usr/local/bin

Debug mode

Syntax: --enable-debug

 Note: This option is generally not used unless it is useful when developing PHP programs. It can display additional error messages.

Safe Mode

Syntax: --enable-safe-mode

 Note: The default value is on, which can provide more protection for system security.

Variable tracking

Syntax: --enable-track-vars

 Description: Allow PHP to track the three variables HTTP_GET_VARS, HTTP_POST_VARS and HTTP_COOKIE_VARS, which are usually turned on.

Automatically add introduced characters

Syntax: --enable-magic-quotes

Description: An introduction character that allows the program to automatically add backslashes during execution.

Open the debugger

Syntax: --enable-debugger

 Description: Open the built-in PHP debugger. At present, this function is still in the experimental stage and has not yet matured.

Cancel path (discard path)

Syntax: --enable-discard-path

 Note: If this option is turned on, users will not be able to read .htaccess and other system security-related files through the browser.

High-precision mathematical functions

Syntax: --enable-bcmath

 Description: Open the high-precision function. This function library must be installed first for this option to be effective.

Force CGI redirection

Syntax: --enable-force-cgi-redirect

Example: If you use CGI VERSION mode to execute PHP settings, turning this option on will increase security. For example, a user reading http://my.host/cgi-bin/php/secret/doc.html may enter the following URL http://my.host/secret/doc when encountering a hacker-level user who knows the PHP system well. html to read relevant information. If PHP and Apache are compiled together, so that PHP becomes part of Apache, there is no need to add this option.

Do not use short tags

Syntax: --disable-short-tags

 Note: After configuring this option, PHP programs cannot use short ; tags, and must use long ; tags.

Introducing remote files

Syntax: --enable-url-includes

 Note: Configuring this option allows the PHP program to include files in the remote HTTP or FTP server.

Turn off syntax effects

Syntax: --disable-syntax-hl

 Note: Using this option will turn off the color effect of PHP syntax.

Function library path

Syntax: CPPFLAGS=-IDIR and LDFLAGS=-LDIR

 Note: If the function library required for PHP security or compilation is in a worthy path, you need to add this option. LDFLAGS represents the path of the function library, and CPPFLAGS represents the path of the header file.

Example: LDFLAGS=-L/my/lib/dir CPPFLAGS=-I/my/include/dir ./configure

Simplified Chinese version, 2005-12-07 17:40:26

 php.ini or php3.ini is the configuration file that PHP will read when it starts. The storage path of this file is /usr/local/lib/. In PHP 3.x version, the configuration file is php3.ini; in PHP 4.x version, it is changed to php.ini. If PHP is installed as a server module, it will be read when the web server starts and executes, and will not be read after that. Therefore, if you change the configuration, you must restart the web server. If using the standalone PHP CGI method, it will be read once every time.

To check the current system configuration, you can use phpinfo()

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/486263.htmlTechArticleIn terms of detailed options, in addition to the installation introduction, other options can also be added during compilation. apache module Syntax: --with-apache=DIR Description: Use this option to make PHP use the apache module...
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