search
HomeBackend DevelopmentPHP TutorialPHP 的编译配置详细选项_PHP

PHP 的编译配置详细选项_PHP

Jun 01, 2016 pm 12:35 PM
compiledetailedgrammarillustrateOptionsConfiguration

apache模块
语法: --with-apache=DIR
说明: 用本选项可以让 PHP 以apache的模块方式使用,DIR 的字符串可以是 /usr/local/apache 或其它安装apache的目录
范例: --with-apache=/var/lib/apache

fhttpd 服务器模块
语法: --with-fhttpd=DIR
说明: 若使用 fttpd 服务器,可以使用本指令编译 PHP。用模块的方式配合 fttpd 服务器,可以有较好的效率。

Adabas D 数据库
语法: --with-adabas=DIR
说明: 数据库系统为 Adabas D 数据库时需要加本选项。关于 Adabas D 数据库的细节,可以参考 http://www.adabas.com。
范例: --with-adabas=/usr/local/adabasd

dBase 资料表
语法: --with-dbase
说明: 只要加本选项,不用其它的参数或函数库,PHP 就会让系统有存取 dBase 资料表的功能。

filePro 数据库
语法: --with-filepro
说明: 不用指定数据库路径及其它函数库等,可以读取 filePro 数据库 (唯读)。

mSQL 数据库
语法: --with-msql=DIR
说明: 提供存取 mSQL 数据库。更多的细节请参考 mSQL 的网站 http://www.hughes.com.au。
范例: --with-msql=/usr/local/Hughes

MySQL 数据库
语法: --with-mysql=DIR
说明: 提供存取 MySQL 数据库。更多的细节请参考 MySQL 的网站 http://www.tcx.se。
范例: --with-mysql=/usr/local/mysql

iODBC 数据库装置
语法: --with-iodbc=DIR
说明: 提供 ODBC 数据库装置,用来存取后端数据库。更多的细节请参考 iODBC 的网站 http://www.iodbc.org。
范例: --with-iodbc=/usr/local/iodbc

OpenLink ODBC 数据库装置
语法: --with-openlink=DIR
说明: 使用 OpenLink ODBC 数据库装置,用来存取后端数据库。更多的细节请参考 OpenLink ODBC 的网站 http://www.openlinksw.com。
范例: --with-openlink=/usr/local/openlink

Oracle 数据库
语法: --with-oracle=DIR
说明: 使用 Oracle 数据库。Oracle 的版本要在 7.3 版以上。您也可以在 PHP 程序中使用环境变量 ORACLE_HOME 来指定 Oracle 的路径。更多有关 Oracle 的信息请参考 Oracle 的网站 http://www.oracle.com。
范例: --with-oracle=/export/app/oracle/product/7.3.2

PostgreSQL 数据库
语法: --with-pgsql=DIR
说明: 使用 PostgreSQL 数据库。更多有关 PostgreSQL 的信息请参考 PostgreSQL 的网站 http://www.postgreSQL.org 或台湾的 Mirror 站 http://postgresql.ccit.edu.tw。
范例: --with-pgsql=/usr/local/pgsql

Solid 数据库
语法: --with-solid=DIR
说明: 使用 Solid 数据库。更多有关 Solid 的信息请参考 Solid 的网站 http://www.solidtech.com。
范例: --with-solid=/usr/local/solid

Sybase 数据库
语法: --with-sybase=DIR
说明: 使用 Sybase 数据库。更多有关 Sybase 的信息请参考 Sybase 的网站 http://www.sybase.com。
范例: --with-sybase=/home/sybase

Sybase-CT 数据库
语法: --with-sybase-ct=DIR
说明: 使用 Sybase-CT 数据库。
范例: --with-sybase-ct=/home/sybase

Velocis 数据库
语法: --with-velocis=DIR
说明: 使用 Velocis 数据库。有关 Velocis 数据库的进一步资料请参考 Raima 公司的网站 http://www.raima.com。
范例: --with-velocis=/usr/local/velocis

自订 ODBC 数据库驱动程序
语法: --with-custom-odbc=DIR
说明: 使用自订的 ODBC 函数库。当然,在使用本方式时要指定 CUSTOM_ODBC_LIBS 及 CFLAGS 变量。例如在 QNX 机器上使用 Sybase SQL Anywhere 时可能要配置系统环境变量 CFLAGS=-DODBC_QNX、LDFLAGS=-lunix 及 CUSTOM_ODBC_LIBS="-ldblib -lodbc",并要在 PHP 配置加入 --with-custom-odbc=/usr/lib/sqlany50
范例: --with-custom-odbc=/usr/local/odbc

不使用 ODBC 数据库驱动程序
语法: --disable-unified-odbc
说明: 使用本选项将使所有的 ODBC 数据库驱动程序不作用。本选项不用指定路径,而受本选项影响的选项有 --with-iodbc、--with-solid、--with-adabas、--with-velocis 及 --with-custom-odbc。

LDAP 目录协议
语法: --with-ldap=DIR
说明: 若要使用目录协议 (Lightweight Directory Access Protocol, LDAP) 则必须要打开本选项。有关 LDAP 的细节,可以参考 RFC 文件的 RFC1777 及 RFC1778。
范例: --with-ldap=/usr/local/ldap.

mcrypt 编码函数库
语法: --with-mcrypt=DIR
说明: 当安装了 mcrypt 函数库后,可在编译 PHP 时加入本选项,让程序可以使用编解码功能。
范例: --with-mcrypt=/usr/local/include
Sys V 信号
语法: --enable-sysvsem
说明: 要使用 SysV 的信号 (semaphores) 机制,则要打开本选项。

XML 支持
语法: --with-xml
说明: 打开本选项可以支持 James Clark's 写的 XML 解析程序库。
维护模式
语法: --enable-maintainer-mode
说明: 本选项一般不会打开,除非是 PHP 开发人员比较有用。

正则表达式程序库
语法: --with-system-regex
说明: 若您需要额外的正则表达式功能,可以加入本选项。

PHP 配置文件
语法: --with-config-file-path=DIR
说明: 用来指定 php3.ini 或 php4.ini 的路径,供 PHP 初始化时使用。
范例: --with-config-file-path=/usr/local/lib

PHP 执行路径
语法: --with-exec-dir=DIR
说明: 有时为了系统的安全性考虑,会指定 PHP 程序一定要在哪个目录执行。
范例: --with-exec-dir=/usr/local/bin

调试模式
语法: --enable-debug
说明: 本选项一般不会使用,除非在开发 PHP 程序时比较有用。它可以显示额外的错误信息。

安全模式
语法: --enable-safe-mode
说明: 默认值是打开的,可以对系统安全提供比较多的保护。

变量追踪
语法: --enable-track-vars
说明: 让 PHP 能 追踪 HTTP_GET_VARS、HTTP_POST_VARS 及 HTTP_COOKIE_VARS 三个变量,一般是打开的。

自动加引入字符
语法: --enable-magic-quotes
说明: 可让程序在执行时自动加入反斜线的引入字符。

打开调试器
语法: --enable-debugger
说明: 打开内建的 PHP 调试器。目前本功能还在实验阶段,尚未成熟。

取消路径 (discard path)
语法: --enable-discard-path
说明: 打开这个选项,用户就不能透过浏览器读取 .htaccess 等和系统安全相关的文件。

高精确度数学函数
语法: --enable-bcmath
说明: 打开高精确度函数。必须要先安装本函数库,本选项方有效。

强制 CGI 重定向
语法: --enable-force-cgi-redirect
范例: 若使用 CGI VERSION 模式来执行 PHP 的设,打开本选项会增加安全性。例如用户读 http://my.host/cgi-bin/php/secret/doc.phpl 遇到比较了解 PHP 系统的黑客级用户可能会自已输入以下网址 http://my.host/secret/doc.phpl 来读取相关信息。若 PHP 和 Apache 编译在一起,让 PHP 变成 Apache 的一部份,则不需要加入本选项。

不使用短的标记
语法: --disable-short-tags
说明: 配置本选项后,PHP 的程序就不能使用短的 .... ?> 标记,一定要用 的长标记。

引入远端档宁
语法: --enable-url-includes
说明: 配置本选项可让 PHP 程序可以引入 (include) 远端的 HTTP 或 FTP 服务器中的文件。

关闭语法效果
语法: --disable-syntax-hl
说明: 使用本选项会关闭 PHP 语法的彩色效果。

函数库路径
语法: CPPFLAGS=-IDIR 及 LDFLAGS=-LDIR
说明: 若 PHP 在安全或编译所需的函数库在值得的路径,需要加入本选项,LDFLAGS 表示函数库的路径,CPPFLAGS 表示标头文件的路径。
范例: LDFLAGS=-L/my/lib/dir CPPFLAGS=-I/my/include/dir ./configure

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
How does PHP type hinting work, including scalar types, return types, union types, and nullable types?How does PHP type hinting work, including scalar types, return types, union types, and nullable types?Apr 17, 2025 am 12:25 AM

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values ​​and handle functions that may return null values.

How does PHP handle object cloning (clone keyword) and the __clone magic method?How does PHP handle object cloning (clone keyword) and the __clone magic method?Apr 17, 2025 am 12:24 AM

In PHP, use the clone keyword to create a copy of the object and customize the cloning behavior through the \_\_clone magic method. 1. Use the clone keyword to make a shallow copy, cloning the object's properties but not the object's properties. 2. The \_\_clone method can deeply copy nested objects to avoid shallow copying problems. 3. Pay attention to avoid circular references and performance problems in cloning, and optimize cloning operations to improve efficiency.

PHP vs. Python: Use Cases and ApplicationsPHP vs. Python: Use Cases and ApplicationsApr 17, 2025 am 12:23 AM

PHP is suitable for web development and content management systems, and Python is suitable for data science, machine learning and automation scripts. 1.PHP performs well in building fast and scalable websites and applications and is commonly used in CMS such as WordPress. 2. Python has performed outstandingly in the fields of data science and machine learning, with rich libraries such as NumPy and TensorFlow.

Describe different HTTP caching headers (e.g., Cache-Control, ETag, Last-Modified).Describe different HTTP caching headers (e.g., Cache-Control, ETag, Last-Modified).Apr 17, 2025 am 12:22 AM

Key players in HTTP cache headers include Cache-Control, ETag, and Last-Modified. 1.Cache-Control is used to control caching policies. Example: Cache-Control:max-age=3600,public. 2. ETag verifies resource changes through unique identifiers, example: ETag: "686897696a7c876b7e". 3.Last-Modified indicates the resource's last modification time, example: Last-Modified:Wed,21Oct201507:28:00GMT.

Explain secure password hashing in PHP (e.g., password_hash, password_verify). Why not use MD5 or SHA1?Explain secure password hashing in PHP (e.g., password_hash, password_verify). Why not use MD5 or SHA1?Apr 17, 2025 am 12:06 AM

In PHP, password_hash and password_verify functions should be used to implement secure password hashing, and MD5 or SHA1 should not be used. 1) password_hash generates a hash containing salt values ​​to enhance security. 2) Password_verify verify password and ensure security by comparing hash values. 3) MD5 and SHA1 are vulnerable and lack salt values, and are not suitable for modern password security.

PHP: An Introduction to the Server-Side Scripting LanguagePHP: An Introduction to the Server-Side Scripting LanguageApr 16, 2025 am 12:18 AM

PHP is a server-side scripting language used for dynamic web development and server-side applications. 1.PHP is an interpreted language that does not require compilation and is suitable for rapid development. 2. PHP code is embedded in HTML, making it easy to develop web pages. 3. PHP processes server-side logic, generates HTML output, and supports user interaction and data processing. 4. PHP can interact with the database, process form submission, and execute server-side tasks.

PHP and the Web: Exploring its Long-Term ImpactPHP and the Web: Exploring its Long-Term ImpactApr 16, 2025 am 12:17 AM

PHP has shaped the network over the past few decades and will continue to play an important role in web development. 1) PHP originated in 1994 and has become the first choice for developers due to its ease of use and seamless integration with MySQL. 2) Its core functions include generating dynamic content and integrating with the database, allowing the website to be updated in real time and displayed in personalized manner. 3) The wide application and ecosystem of PHP have driven its long-term impact, but it also faces version updates and security challenges. 4) Performance improvements in recent years, such as the release of PHP7, enable it to compete with modern languages. 5) In the future, PHP needs to deal with new challenges such as containerization and microservices, but its flexibility and active community make it adaptable.

Why Use PHP? Advantages and Benefits ExplainedWhy Use PHP? Advantages and Benefits ExplainedApr 16, 2025 am 12:16 AM

The core benefits of PHP include ease of learning, strong web development support, rich libraries and frameworks, high performance and scalability, cross-platform compatibility, and cost-effectiveness. 1) Easy to learn and use, suitable for beginners; 2) Good integration with web servers and supports multiple databases; 3) Have powerful frameworks such as Laravel; 4) High performance can be achieved through optimization; 5) Support multiple operating systems; 6) Open source to reduce development costs.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment