PHP Common compilation Parameters Chinese description

Source: Internet
Author: User
Tags fpm gettext ini ldap odbc sybase sybase database oracle database

This article mainly introduces the PHP commonly used compiler parameter Chinese explanation, this article uses the detailed Chinese annotation the PHP compilation parameter function, needs the friend to be possible to refer to under

  Interpretation of common parameters for compiling PHP

The code is as follows:

--prefix=/usr/local/php #指定 PHP installation directory

--with-apxs2=/usr/local/apache/bin/apxs #整合apache, the APXS function is to use the loadmodule instruction in Mod_so to load the specified module to Apache, asking Apache to open the so module

--with-config-file-path=/usr/local/php/etc #用来指定 Php3.ini or Php4.ini path

--with-mysql=/usr/local/mysql #mysql安装目录, support for MySQL

--with-mysqli=/usr/local/mysql/bin/mysql_config #mysqli扩展技术不仅可以调用MySQL的存储过程, handles MySQL transactions, and also makes access to database work more stable.

--with-mysql-sock=/tmp/mysql.sock #指定mysql套接字文件位置

--enable-safe-mode #打开安全模式, the default value is open

--disable-short-tags #配置本选项后, PHP program can not use the short tag, must use the long tag

--with-exec-dir=dir #PHP Execution path (sometimes for system security considerations, specify which directory the PHP program must execute)

--enable-ftp #打开ftp的支持

--enable-zip #打开对zip的支持

--WITH-BZ2 #打开对bz2文件的支持

--with-jpeg-dir #打开对jpeg图片的支持

--with-png-dir #打开对png图片的支持

--with-freetype-dir #打开对freetype字体库的支持

--without-iconv #关闭iconv函数, conversion between the various character sets

--with-libxml-dir #打开libxml2库的支持

--with-xmlrpc #打开xml-rpc's C language

--with-zlib-dir #打开zlib库的支持

--WITH-GD #打开gd库的支持

--enable-gd-native-ttf #支持TrueType字符串函数库

--with-curl #打开curl浏览工具的支持

--with-curlwrappers #运用curl工具打开url流

--with-ttf #打开freetype1. * Support, you can not add

--with-xsl #打开XSLT file support, expands LibXML2 library, requires LIBXSLT software

--with-gettext #打开gnu gettext Support, the encoding library is used to

--with-pear #打开pear命令的支持, PHP extension

--enable-calendar #打开日历扩展功能

--enable-mbstring #多字节, support for strings

--enable-sqlite-utf8 #使sqllite支持utf-8

--enable-bcmath #打开图片大小调整, this module was used to monitor the Zabbix.

--enable-sockets #打开 sockets support

--enable-exif #图片的元数据支持

--enable-magic-quotes #魔术引用的支持

--disable-rpath #关闭额外的运行库文件

--disable-debug #关闭调试模式

--enable-debug #本选项一般不会使用 unless it is useful to develop PHP programs. It can display additional error messages

--with-ldap=dir #若要使用目录协议 (Lightweight Directory Access Protocol, LDAP) You must turn this option on. For details about LDAP, refer to the RFC1777 and RFC1778 of the RFC file

--with-mime-magic=/usr/share/file/magic.mime #魔术头文件位置

--with-apache=dir #用本选项可以让 PHP is used in the Apache module, DIR's string can be/usr/local/apache or other directories to install Apache

--with-custom-odbc=dir #使用自订的 ODBC function library. Of course, you specify the custom_odbc_libs and Cflags variables when using this method. For example, when using Sybase SQL Anywhere on QNX machines, you might configure system environment variables CFLAGS=-DODBC_QNX, Ldflags=-lunix, and custom_odbc_libs= "-ldblib-lodbc" and HP Configuration Join--WITH-CUSTOM-ODBC=/USR/LIB/SQLANY50

--with-oracle=dir #使用 Oracle Database. Oracle versions are to be in version 7.3. You can also use 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

--with-sybase=dir #使用 Sybase database. For more information on Sybase, please refer to Sybase's website

--with-sybase-ct=dir #使用 SYBASE-CT Database

  The CGI method installs the commonly used parameters:

The code is as follows:

--ENABLE-FPM #打上PHP-fpm Patch only after this parameter, CGI installation of the boot program

--enable-fastcgi #支持fastcgi方式启动PHP

--enable-force-cgi-redirect #重定向方式启动PHP

--with-ncurses #支持ncurses screen drawing and dynamic library of graphic interactive function based on text terminal

--enable-pcntl #freeTDS需要用到的, may be linked to MSSQL to use

--with-mcrypt #mcrypt算法的扩展

--with-mhash #mhash算法的扩展

The above function libraries need to be installed

--with-gmp #应该是支持一种规范

--enable-inline-optimization #优化线程

--with-openssl #openssl的支持, used to encrypt the transmission

--enable-dbase #建立DBA as a shared module

--with-pcre-dir=/usr/local/bin/pcre-config #perl的正则库案安装位置


--WITH-GDBM #dba的gdbm支持




--enable-zend-multibyte #支持zend的多字节





Note: Extensions that need to be installed separately

1. GD Library.

2. The expansion of the Ming.

3. Expansion of Mhash and MCrypt

1> specified--WITH-APXS2=/USR/LOCAL/APACHE/BIN/APXS, do not activate--ENABLE-FPM and--enable-fastcgi,apxs PHP module in the mode of PHP loading.

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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: and provide relevant evidence. A staff member will contact you within 5 working days.