PHP common compilation Parameters

Source: Internet
Author: User
Tags openssl library perl regular expression sybase database
This article mainly introduces the description of common PHP compilation parameters in Chinese. This article describes the function of PHP compilation parameters in Chinese. For more information, see

This article mainly introduces the description of common PHP compilation parameters in Chinese. This article describes the function of PHP compilation parameters in Chinese. For more information, see

Compilation of common PHP Parameters

The Code is as follows:


-- Prefix =/usr/local/php # specify the php installation directory
-- With-apxs2 =/usr/local/apache/bin/apxs # integrated apache, apxs function is to use the LoadModule command in mod_so, load the specified module to apache, require apache to open the SO Module
-- With-config-file-path =/usr/local/php/etc # specifies the php3.ini or php4.ini path.
-- With-MySQL =/usr/local/mysql # mysql installation directory, which supports mysql
-- With-mysqli =/usr/local/mysql/bin/mysql_config # The mysqli extension technology can not only call MySQL stored procedures, but also process MySQL transactions, it also makes database access more stable.
-- With-mysql-sock =/tmp/mysql. sock # specify the location of the mysql socket File
-- Enable-safe-mode # enable security mode. The default value is enable.
-- Disable-short-tags # after this option is configured, PHP programs cannot use short tags, which must be long tags.
-- With-exec-dir = DIR # PHP Execution path (sometimes it specifies the directory in which the PHP program must be executed for system security considerations)
-- Enable-ftp # enable ftp support
-- Enable-zip # enable zip support
-- With-bz2 # open support for bz2 files
-- With-jpeg-dir # enable support for jpeg images
-- With-png-dir # open support for png Images
-- With-freetype-dir # open support for freetype Library
-- Without-iconv # disable the iconv function and convert various character sets.
-- With-libXML-dir # Open libxml2 library support
-- With-XMLrpc # Open the C language of xml-rpc
-- With-zlib-dir # support for opening the zlib library
-- With-gd # support for opening the gd library
-- Enable-gd-native-ttf # support TrueType string function library
-- With-curl # support for enabling the curl browser Tool
-- With-curlwrappers # Use the curl tool to open the url stream
-- With-ttf # enable freetype1. *. You can skip this step.
-- With-xsl # Open the support for XSLT files. libXML2 library is extended and libxslt software is required.
-- With-gettext # Open the gnu gettext support, which is used by the encoding library.
-- With-pear # support for opening the pear command, which is used for PHP Extension
-- Enable-calendar # enable the calendar Extension function
-- Enable-mbstring # multi-byte, string supported
-- Enable-sqlite-utf8 # Make sqllite support UTF-8
-- Enable-bcmath # enable image size adjustment. This module is used for zabbix monitoring.
-- Enable-sockets # enable sockets
-- Enable-exif # metadata support for images
-- Enable-magic-quotes # magic reference support
-- Disable-rpath # disable additional Runtime library files
-- Disable-debug # disable debugging mode
-- Enable-debug # This option is generally not used unless it is useful when developing a PHP program. It can display additional error messages
-- With-ldap = DIR # To use the Directory Protocol (Lightweight Directory Access Protocol, LDAP), you must enable this option. For more information about LDAP, see RFC1777 and RFC1778 In the RFC file.
-- With-mime-magic =/usr/share/file/magic. mime # magic header file location
-- With-apache = DIR # with this option, PHP can be used as an apache module. The DIR string can be/usr/local/apache or other directories that install apache.
-- With-custom-odbc = DIR # Use the 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 the QNX machine, you may need to configure the system environment variables CFLAGS =-DODBC_QNX, LDFLAGS =-lunix and CUSTOM_ODBC_LIBS = "-ldblib-lodbc ", add -- with-custom-odbc =/usr/lib/sqlany50 to the PHP configuration.
-- With-oracle = DIR # Use the Oracle database. The Oracle version must be later than Version 7.3. You can also use the environment variable ORACLE_HOME in the PHP program to specify the path of Oracle. For more information about Oracle, see the Oracle website.
-- With-sybase = DIR # Use the Sybase Database. For more information about Sybase, see the Sybase website.
-- With-sybase-ct = DIR # Use Sybase-CT Database

Common Parameters for CGI installation:

The Code is as follows:


-- Enable-fpm # this parameter is available only after the PHP-fpm patch is installed. The startup program installed in CGI Mode
-- Enable-fastCGI # supports fastcgi to start PHP
-- Enable-force-CGI-redirect # Start PHP In redirection Mode
-- With-ncurses # A dynamic library that supports ncurses screen rendering and graphic interaction based on text Terminals
-- Enable-pcntl # freeTDS needs to be used, which may be used only when mssql is linked.
-- With-mcrypt # mcrypt algorithm Extension
-- With-mhash # mhash algorithm Extension
The above function library needs to be installed
-- With-gmp # should support a Specification
-- Enable-inline-optimization # optimized thread
-- With-openssl # openssl support, used for encrypted transmission
-- Enable-dbase # create a DBA as a shared Module
-- With-pcre-dir =/usr/local/bin/pcre-config # installation location of perl Regular Expression Library
-- Disable-dmalloc
-- With-gdbm # gdbm support for dba
-- Enable-sigchild
-- Enable-sysvsem
-- Enable-sysvshm
-- Enable-zend-multibyte # supports multiple zend bytes.
-- Enable-mbregex
-- Enable-wddx
-- Enable-shmop
-- Enable-soap

Note: extensions to be separately installed

1. gd library.
2. ming extension.
3. mhash and mcrypt extensions

1> after -- with-apxs2 =/usr/local/apache/bin/apxs is specified, do not activate -- enable-fpm and -- enable-fastCGI, apxs loads php in the PHP module mode.

2> after Mysql compiles the Mysql development library, you do not need to specify the mysql path.

3> PHP compilation has a basic dependency. To compile PHP, you must first install XML extension. Because the php5 core enables XML support by default, and other basic libraries need:

4> GD-> zlib, Png, and Jpg. If you need to support others, you still need to compile the extension library based on the actual situation. The ttf library needs freetype library support.

5> -- enable-magic-quotes is an extremely unrecommended parameter. Of course, if you need PHP to do the underlying work for you, it does not solve the problem thoroughly.

6>-with-openssl: The openssl library is required.

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.