程序员最近都爱上了这个网站  程序员们快来瞅瞅吧!  it98k网:it98k.com

本站消息

站长简介/公众号

  出租广告位,需要合作请联系站长

+关注
已关注

分类  

暂无分类

标签  

暂无标签

日期归档  

php.ini配置文件详解(基于5.2.17版本)

发布于2021-03-14 06:08     阅读(626)     评论(0)     点赞(19)     收藏(0)


[PHP]

;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;
; 关于php.ini文件 ;
;;;;;;;;;;;;;;;;;;;

; This file controls many aspects of PHP's behavior. In order for PHP to
; read it, it must be named 'php.ini'. PHP looks for it in the current
; working directory, in the path designated by the environment variable
; PHPRC, and in the path that was defined in compile time (in that order).
; Under Windows, the compile-time path is the Windows directory. The
; path in which the php.ini file is looked for can be overridden using
; the -c argument in command line mode.

; 这个文件控制了 PHP 行为的许多方面。为了让 PHP 读取这个文件,它必须被
; 命名为 'php.ini'。PHP 将在这些地方依次查找该文件:当前工作目录、环境
; 变量 PHPRC 指明的路径、编译时指定的路径。
; 在 windows 下,编译时的路径是Windows安装目录。
; 在命令行模式下,php.ini 的查找路径可以用 -c 参数替代。

; The syntax of the file is extremely simple. Whitespace and Lines
; beginning with a semicolon are silently ignored (as you probably guessed).
; Section headers (e.g. [Foo]) are also silently ignored, even though they
; might mean something in the future.

; 该文件的语法非常简单。空白字符和用分号';'开始的行被简单地忽略(就象你可能
; 猜到的一样)。
; 章节标题(如:[Foo])也被简单地忽略,即使将来它们可能有某种的意义。

; Directives are specified using the following syntax:
; directive = value
; Directive names are *case sensitive* - foo=bar is different from FOO=bar.

; (每个配置选项由“指令标识符”和“值”组成。)
; 指令标识符被指定使用如下语法:
; 指令标识符 = 值
; 指令标识符名称是大小写敏感的。比如 foo=bar 不同于 FOO=bar。

; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one
; of the INI constants (On, Off, True, False, Yes, No and None) or an expression
; (e.g. E_ALL & ~E_NOTICE), or a quoted string ("foo").

; 值可以是一个字符串,一个数字,一个 PHP 常量(如:E_ALL或M_PI),
; 一个 INI 常量的(On、Off、True、False、Yes、No和None),
; 或是一个表达式(如:E_ALL & ~E_NOTICE),
; 或是用引号括起来的字符串("foo")

; Expressions in the INI file are limited to bitwise operators and parentheses:
; INI 文件中的表达式被限制仅使用位运算符和圆括号:

; | bitwise OR
; & bitwise AND
; ~ bitwise NOT
; ! boolean NOT

; | 位或
; & 位与
; ~ 位非
; ! 逻辑非
;
; Boolean flags can be turned on using the values 1, On, True or Yes.
; They can be turned off using the values 0, Off, False or No.

; 布尔标志可用 1、On、True 或 Yes 这些值置于开(激活)的状态。
; 它们可用 0、Off、False 或 No 这些值置于关(禁用)的状态。

; An empty string can be denoted by simply not writing anything after the equal
; sign, or by using the None keyword:

; 一个空字符串可以用在等号后不写任何东西表示,或者用 None 关键字:

; foo = ; sets foo to an empty string
; foo = none ; sets foo to an empty string
; foo = "none" ; sets foo to the string 'none'

; foo = ; 将foo置为空字符串
; foo = none ; 将foo置为空字符串
; foo = "none" ; 将foo置为字符串'none'

; If you use constants in your value, and these constants belong to a
; dynamically loaded extension (either a PHP extension or a Zend extension),
; you may only use these constants *after* the line that loads the extension.

; 如果你在配置选项的值使用了常量,而这些常量属于动态链接扩展库(不是 PHP 的扩展,
; 就是 Zend 的扩展),你只能在调入这些扩展库的选项行之后使用这些常量。

 

;;;;;;;;;;;;;;;;;;;
; About this file ;
;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;
; 关于这个文件 ;
;;;;;;;;;;;;;;;;;;;

; This is the recommended, PHP 5-style version of the php.ini-dist file.
; It sets some non standard settings, that make PHP more efficient, more secure,
; and encourage cleaner coding.

; 这个版本是推荐使用的,PHP 5 风格的 php.ini 版本。
; 这个版本使用了一些非标准设置,目的是使 PHP 更加高效、安全,鼓励更加整洁的代码。
;
; The price is that with these settings, PHP may be incompatible with some
; applications, and sometimes, more difficult to develop with. Using this
; file is warmly recommended for production sites. As all of the changes from
; the standard settings are thoroughly documented, you can go over each one,
; and decide whether you want to use it or not.
;
; 使用这些选项的代价是可能与某些程序不兼容,并给开发带来难度。
; 我们鼓励在正式发布网站时使用这个配置。
; 所有与默认不同的设置都有明显的注明,你可以决定是否使用与默认不同的设置。
;
; For general information about the php.ini file, please consult the php.ini-dist
; file, included in your PHP distribution.
;
; 有关php.ini的普通说明请参考php安装文件夹下的php.ini-dist文件。
;
; This file is different from the php.ini-dist file in the fact that it features
; different values for several directives, in order to improve performance, while
; possibly breaking compatibility with the standard out-of-the-box behavior of
; PHP. Please make sure you read what's different, and modify your scripts
; accordingly, if you decide to use this file instead.
;
; 这个文件和 php.ini-dist 不同,有些指令的设置改变了。
; 这样做是为了提高性能和保障安全。
; 请确认你阅读了不同之处,并且修改过你的脚本,再采用这个版本的配置文件。

; - register_long_arrays = Off [Performance]
; Disables registration of the older (and deprecated) long predefined array
; variables ($HTTP_*_VARS). Instead, use the superglobals that were
; introduced in PHP 4.1.0
; 禁用旧式的长式预定义数组变量($HTTP_*_VARS)。从 PHP 4.1.0 开始用预定义
; 超全局数组替代。

; - display_errors = Off [Security]
; With this directive set to off, errors that occur during the execution of
; scripts will no longer be displayed as a part of the script output, and
; thus, will no longer be exposed to remote users. With some errors, the
; error message content may expose information about your script, web server,
; or database server that may be exploitable for hacking. Production sites
; should have this directive set to off.
; 关闭这个特性,在脚本执行期间发生的错误/警告将不会显示输出,这样就不会将
; 敏感信息暴露给远端用户。
; 一些错误/警告信息的内容会暴露可能被攻击者利用的脚本信息、服务器信息、
; 数据库信息。
; 正式发布网站时应当关闭这个特性。

; - log_errors = On [Security]
; This directive complements the above one. Any errors that occur during the
; execution of your script will be logged (typically, to your server's error
; log, but can be configured in several ways). Along with setting
; display_errors to off, this setup gives you the ability to fully understand
; what may have gone wrong, without exposing any sensitive information to
; remote users.
; 这个指令是上一个指令的补充。脚本执行期间的任何错误将被记录到日志文件中
; (比如,系统日志),但仍然可以有几种不同的配置方法。
; 配合将"display_errors"关闭,这个设置可以让你完全明白那里出了问题,而不会
; 暴露任何敏感信息给远端用户。

; - output_buffering = 4096 [Performance]
; Set a 4KB output buffer. Enabling output buffering typically results in
; less writes, and sometimes less packets sent on the wire, which can often
; lead to better performance. The gain this directive actually yields
; greatly depends on which Web server you're working with, and what kind of
; scripts you're using.
; 设置一个 4KB 的输出缓冲。启用输出缓存经常可以减少写入次数,有时还能减少传输
; 数据包的大小。这些都有助于提高性能。这个参数的实际收益取很大程度上取决于
; 你使用的是什么 Web 服务器,使用的是什么样的脚本。

; - register_argc_argv = Off [Performance]
; Disables registration of the somewhat redundant $argv and $argc global
; variables.
; 禁止注册有些多余的 $argv 和 $argc 全局变量。

; - magic_quotes_gpc = Off [Performance]
; Input data is no longer escaped with slashes so that it can be sent into
; SQL databases without further manipulation. Instead, you should use the
; database vendor specific escape string function on each input element you
; wish to send to a database.
; 不将输入的数据用反斜杠进行转义,以便发送给数据库时不需要更多的处理。
; 事实上,你应该对每个发送到数据库的输入单元使用数据库内置的字符串转义函数。

; - variables_order = "GPCS" [Performance]
; The environment variables are not hashed into the $_ENV.
; To access environment variables, you can use getenv() instead.
; 使得 $_ENV 数组中的环境变量不再杂乱无章。
; 你应当使用 getenv() 函数存取环境变量。

; - error_reporting = E_ALL [Code Cleanliness, Security(?)]
; By default, PHP suppresses errors of type E_NOTICE. These error messages
; are emitted for non-critical errors, but that could be a symptom of a
; bigger problem. Most notably, this will cause error messages about the use
; of uninitialized variables to be displayed.
; 默认情况下,PHP 阻止 E_NOTICE 类型的错误报告。
; E_ALL 表示报告所有非致命错误,但是这些错误可能会导致大问题。
; 最值得注意的是,这将导致显示有关使用未初始化变量的错误消息。

; - allow_call_time_pass_reference = Off [Code cleanliness]
; It's not possible to decide to force a variable to be passed by reference
; when calling a function. The PHP 4 style to do this is by making the
; function require the relevant argument by reference.
; 禁止默认将函数的参数按引用传递。
; PHP 4 风格的处理办法是在函数声明时指定按引用传递。

; - short_open_tag = Off [Portability]
; Using short tags is discouraged when developing code meant for
; redistribution since short tags may not be supported on the target server.
; 在开发用于重新分发的代码时,不鼓励使用短标记,因为目标服务器上可能不支持
; 短标记。

 

;;;;;;;;;;;;;;;;;;;;
; Language Options ;
;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;
; 语言选项 ;
;;;;;;;;;;;;;;;;;;;;

; Enable the PHP scripting language engine under Apache.
; 使 PHP 脚本语言引擎在 Apache 下有效。
engine = On

; Enable compatibility mode with Zend Engine 1 (PHP 4.x)
; 允许使用 Zend 引擎1(PHP 4.x)的兼容模式。
; 这将影响对象的复制、构造(无属性的对象会产生 FALSE 或 0)、比较。
; 兼容模式下,对象将按值传递,而不是默认的按引用传递。
zend.ze1_compatibility_mode = Off

; Allow the <? tag. Otherwise, only <?php and <script> tags are recognized.
; NOTE: Using short tags should be avoided when developing applications or
; libraries that are meant for redistribution, or deployment on PHP
; servers which are not under your control, because short tags may not
; be supported on the target server. For portable, redistributable code,
; be sure not to use short tags.

; 允许 <? ?> 短标识,否则只有 <?php 和 <script> 标识才能被识别。
; 注意:除非你的 php 程序只供自己使用,否则请不要使用短标记。

; 如果要和 XML 结合使用 PHP,你可以选择禁用此选项以方便直接嵌入使用<?xml ?>,
; 不然你必须用 PHP 来输出:<? echo '<?xml version="1.0"'; ?>
; 本指令也会影响到缩写形式 <?=,它和 <? echo 等价,要使用此缩写必须允许短标识。
short_open_tag = On

; Allow ASP-style <% %> tags.
; 允许 ASP 风格的 <% %> 标签,这也会影响到缩写形式 <%= $value %> 。
asp_tags = Off

; The number of significant digits displayed in floating point numbers.
; 浮点类型数显示时的有效位数
precision = 14

; Enforce year 2000 compliance (will cause problems with non-compliant browsers)
; 是否打开 2000 年适应(可能在非 Y2K 适应的浏览器中导致问题)
y2k_compliance = On

; Output buffering allows you to send header lines (including cookies) even
; after you send body content, at the price of slowing PHP's output layer a
; bit. You can enable output buffering during runtime by calling the output
; buffering functions. You can also enable output buffering for all files by
; setting this directive to On. If you wish to limit the size of the buffer
; to a certain size - you can use a maximum number of bytes instead of 'On', as
; a value for this directive (e.g., output_buffering=4096).

; 输出缓存大小(单位:字节)。
; 输出缓存甚至允许你在输出正文内容之后发送 HTTP 头(包括 cookies)。
; 其代价是输出层减慢一点点速度。
; 你可以在运行期间通过调用输出缓冲函数来启用输出缓存。
; 或者在这里将指令设为 "On" 而使得所有文件都启用输出缓存。
; 如果你想限制缓冲区的大小,你可以直接将 "On" 替换成最大字节数。
; 比如:"output_buffering=4096" 指定了缓存上限为 4096 字节。

; 启用输出缓存可以减少写入次数,有时还能减少传输数据包的大小。
; 这些都有助于提高性能。
; 这个参数的实际收益取很大程度上取决于你使用的是什么 Web 服务器,使用的是什么
; 样的脚本。

output_buffering = 4096

; You can redirect all of the output of your scripts to a function. For
; example, if you set output_handler to "mb_output_handler", character
; encoding will be transparently converted to the specified encoding.
; Setting any output handler automatically turns on output buffering.
; Note: People who wrote portable scripts should not depend on this ini
; directive. Instead, explicitly set the output handler using ob_start().
; Using this ini directive may cause problems unless you know what script
; is doing.
; Note: You cannot use both "mb_output_handler" with "ob_iconv_handler"
; and you cannot use both "ob_gzhandler" and "zlib.output_compression".
; Note: output_handler must be empty if this is set 'On' !!!!
; Instead you must use zlib.output_handler.

; 你可以将所有脚本输出重定向到一个输出处理函数。
; 比如,将这个指令设置为 "mb_output_handler" 函数时,字符编码将被透明地转换为指
; 定的编码(很可能是gzip或deflate编码)。
; 一旦指定了输出处理程序,output_buffering 指定的输出缓存将被自动打开。
; (此处仅能使用 PHP 内置的函数,自定义函数应在脚本中使用 ob_start() 指定。)
;
; 注意1:在编写可移植脚本的时候不能依赖这个指令,而应明确的调用 ob_start() 函数
; 打开输出缓存。使用这个指令可能会导致某些你不熟悉的脚本出错。
; 注意2:你不能同时使用 "mb_output_handler" 和 "ob_iconv_handler"。
; 你也不能同时使用 "ob_gzhandler" 和 "zlib.output_compression"。
; 注意3:如果用 "zlib.output_handler" 指令开启 zlib 输出压缩,
; 那么 "output_handler" 必须为空。

;output_handler =

; Transparent output compression using the zlib library. Valid values for
; this option are 'off', 'on', or a specific buffer size to be used for
; compression (default is 4KB)
; Note: Resulting chunk size may vary due to nature of compression. PHP
; outputs chunks that are few hundreds bytes each as a result of
; compression. If you prefer a larger chunk size for better
; performance, enable output_buffering in addition.
; Note: You need to use zlib.output_handler instead of the standard
; output_handler, or otherwise the output will be corrupted.

; 使用 zlib 库透明地压缩脚本输出结果。
; 该指令的值可以设置为:Off、On、字节数(用来作为压缩缓冲区大小,默认为 4KB)。
; 注意1:由于压缩的性质,块大小可能会有所不同。由于压缩,PHP 输出的数据块
; 只有几百字节。如果你用一个更大的块来获得到更高的压缩率,那么应该额
; 外激活 output_buffering。
; 注意2:如果用 "zlib.output_handler" 指令开启 zlib 输出压缩,
; 那么 "output_handler" 必须为空。
;
; 如果在 php.ini 或者 apache 配置中打开这个功能,当浏览器发送
; "Accept-Encoding: gzip(deflate)" 头时,"Content-Encoding: gzip(deflate)" 和
; "Vary: Accept-Encoding" 头将加入到应答头当中。
; 你可以在应答头输出之前用 ini_set() 函数在脚本中禁止这个特性。
; 如果你输出一个 "Content-Type: image/" 这样的应答头,
; 压缩将不会启用(为了防止 Netscape 的 bug)。
; 你可以在输出 "Content-Type: image/" 之后使用
; "ini_set('zlib.output_compression', 'On')" 重新打开这个特性。

zlib.output_compression = Off
;zlib.output_compression_level = -1

; You cannot specify additional output handlers if zlib.output_compression
; is activated here. This setting does the same as output_handler but in
; a different order.

; 在打开 "zlib.output_compression" 指令的情况下,除这里以外,
; 你不能另外指定输出处理程序。
; 这个指令和 "output_handler" 起相同的作用,但是顺序不同。

;zlib.output_handler =

; Implicit flush tells PHP to tell the output layer to flush itself
; automatically after every output block. This is equivalent to calling the
; PHP function flush() after each and every call to print() or echo() and each
; and every HTML block. Turning this option on has serious performance
; implications and is generally recommended for debugging purposes only.

; 这个指令告诉 PHP 输出层在每个输出块之后自动刷新自身数据。
; 这等效于在每次 print() 或 echo() 调用和每个 HTML 块后调用 flush() 函数。
; 打开这个选项对程序执行的性能有严重的影响,通常只推荐在调试时使用。

implicit_flush = Off

; The unserialize callback function will be called (with the undefined class'
; name as parameter), if the unserializer finds an undefined class which should
; be instantiated.
; A warning appears if the specified function is not defined, or if the function
; doesn't include/implement the missing class.
; So only set this entry, if you really want to implement such a
; callback-function.

; 如果解序列化程序需要实例化一个未定义类,这里指定的回调函数将以该未定义类的
; 名字作为参数被 unserialize() 调用
; (,以免得到不完整的 "__PHP_Incomplete_Class" 对象)。
; 如果这里没有指定回调函数,或者指定的函数不包含(或实现)那个未定义的类,
; 将会显示一条警告信息。
; 只有在你真想执行这样一个回调函数的情况下,才需要指定该参数的值。
;
; (可以通过 php.ini、ini_set() 或 .htaccess 定义本指令。
; 若要禁止这个特性,只需置空此指令。)

unserialize_callback_func =

; When floats & doubles are serialized store serialize_precision significant
; digits after the floating point. The default value ensures that when floats
; are decoded with unserialize, the data will remain the same.

; 将浮点型和双精度型数据序列化存储时,本指令(序列化精度)指明了有效位数。
; 默认值能够确保浮点型数据被解序列化程序解码时不会有数据丢失。

serialize_precision = 100

; Whether to enable the ability to force arguments to be passed by reference
; at function call time. This method is deprecated and is likely to be
; unsupported in future versions of PHP/Zend. The encouraged method of
; specifying which arguments should be passed by reference is in the function
; declaration. You're encouraged to try and turn this option Off and make
; sure your scripts work properly with it in order to ensure they will work
; with future versions of the language (you will receive a warning each time
; you use this feature, and the argument will be passed by value instead of by
; reference).

; 是否强迫函数调用时按引用传递参数。这一方法已经被遗弃,并可能在将来版本
; 的 PHP/Zend 里不再支持。推荐的方法是在函数声明里指定哪些参数按引用传递。
; 推荐尝试关闭这一选项并确认你的脚本仍能正常工作,以保证在将来版本的语言里
; 它们仍能工作。
; (你将在每次使用该功能时得到一个警告,而参数将按值传递而不是按引用传递)。

allow_call_time_pass_reference = Off

 

;;;;;;;;;;;;;;
; Safe Mode ;
;;;;;;;;;;;;;;

;;;;;;;;;;;;;;
; 安全模式 ;
;;;;;;;;;;;;;;

; 安全模式是为了解决共享服务器的安全问题而设立的。
; 但试图在 PHP 层解决这个问题在结构上是不合理的,
; 正确的做法应当是修改 web 服务器层和操作系统层。
; 因此在 PHP 6 中废除了安全模式,并打算使用 open_basedir 指令取代之。

; 是否启用安全模式。
; (打开时,PHP 将检查当前脚本的拥有者是否和被操作的文件的拥有者相同。
; 相同则允许操作,不同则拒绝操作。)
safe_mode = Off

; By default, Safe Mode does a UID compare check when
; opening files. If you want to relax this to a GID compare,
; then turn on safe_mode_gid.
; 安全模式默认情况下在打开文件时会做 UID 比较检查。
; (但有些情况下严格的 UID 检查反而是不适合的,宽松的 GID 检查已经足够。)
; 如果你想将其放宽到 GID 比较,可以打开这个指令。

safe_mode_gid = Off

; When safe_mode is on, UID/GID checks are bypassed when
; including files from this directory and its subdirectories.
; Directory must also be in include_path or full path must
; be used when including.

; 在安全模式下,该文件夹和其子文件夹下的文件被包含时,将跳过 UID/GID 检查。
; (换句话说,如果此处的值为空,任何 UID/GID 不符合的文件都不允许被包含。)
; 文件夹必须在 "include_path" 中或者用完整路径来包含。

; 从 PHP 4.2 开始,本指令可以接受和 "include_path" 指令类似的风格:用分号
; 隔开的路径,而不是一个目录。
; 指定的限制实际上是一个前缀,而非一个目录名。
; 也就是说 "/dir/incl" 将允许访问 "/dir/include"和"/dir/incls"。
; 如果您希望将访问控制在一个指定的目录,那么请在结尾加上一个斜线,
; 例如:"/dir/incl/"。

safe_mode_include_dir =

; When safe_mode is on, only executables located in the safe_mode_exec_dir
; will be allowed to be executed via the exec family of functions.
; 在安全模式下,只有该文件夹下的可执行程序才被执行系统程序的函数执行。

; 这些函数是:system, escapeshellarg, escapeshellcmd, exec, passthru,
; proc_close, proc_get_status, proc_nice, proc_open, proc_terminate,
; shell_exec...

safe_mode_exec_dir =

; Setting certain environment variables may be a potential security breach.
; This directive contains a comma-delimited list of prefixes. In Safe Mode,
; the user may only alter environment variables whose names begin with the
; prefixes supplied here. By default, users will only be able to set
; environment variables that begin with PHP_ (e.g. PHP_FOO=BAR).

; 设置某些环境变量,可能会导致潜在的安全漏洞。
; 该指令包含用逗号分隔的前缀列表,表示用户在安全模式下仅可以更改此列出的
; 前缀开头的环境变量的值。
; 默认地,用户将仅能设定以 PHP_ 开头的环境变量,(如:PHP_FOO=BAR)。

; Note: If this directive is empty, PHP will let the user modify ANY
; environment variable!

; 注意:如果这一参数值为空,PHP 将让用户更改任意环境变量!

safe_mode_allowed_env_vars = PHP_

; This directive contains a comma-delimited list of environment variables that
; the end user won't be able to change using putenv(). These variables will be
; protected even if safe_mode_allowed_env_vars is set to allow to change them.

; 这条指令包含一个用逗号分隔的环境变量列表,那是最终用户将不能用 putenv() 更改的。
; 这些变量甚至在 safe_mode_allowed_env_vars 设置为允许的情况下得到保护(同样
; 不能更改)。

safe_mode_protected_env_vars = LD_LIBRARY_PATH

; open_basedir, if set, limits all file operations to the defined directory
; and below. This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.

; 将 PHP 允许操作的所有文件都限制在此目录下。
; 如果 Web 服务器使用了基于每目录或基于每虚拟主机,这个参数将非常有意义。
; 无论安全模式是否打开,该参数都将起作用。

; 当一个脚本试图用例如 fopen() 或者 gzopen() 打开一个指定目录树之外的文件
; 时,将遭到拒绝。
; 所有的符号连接都会被解析,所以不可能通过符号连接来避开此限制。
; 特殊值'.'指定了存放该脚本的目录将被当做基准目录。
; 但这有些危险,因为脚本的工作目录可以轻易被 chdir() 改变。
; 对于共享服务器,在 httpd.conf 中灵活设置该指令将变得非常有用。
; 在 Windows 中,用分号分隔目录。在任何其它系统中用冒号分隔目录。
; 作为 Apache 模块时,父目录中的 open_basedir 路径将自动被继承。
; 用 open_basedir 指定的限制实际上是一个前缀,而不是一个目录名。
; 也就是说 "/dir/incl" 将允许访问 "/dir/include" 和 "/dir/incls"。
; 如果您希望将访问控制在一个指定的目录,那么请在结尾加上一个斜线。
; 例如:"/dir/incl/"。
; 默认是允许打开所有文件。

;open_basedir =

; This directive allows you to disable certain functions for security reasons.
; It receives a comma-delimited list of function names.
; This directive is *NOT* affected by whether Safe Mode is turned On or Off.

; 这个指令让你可以出于安全原因禁用特定的函数。
; 它接受一个用逗号分隔的函数名列表。
; 无论安全模式是否打开,该指令都将起作用。
;
; (本指令只能设置在 php.ini 中。例如你不能将其设置在 httpd.conf 中。)

disable_functions =

; This directive allows you to disable certain classes for security reasons.
; It receives a comma-delimited list of class names.
; This directive is *NOT* affected by whether Safe Mode is turned On or Off.

; 这个指令让你可以出于安全原因禁用特定的类。
; 它接受一个用逗号分隔的类名列表。
; 无论安全模式是否打开,该指令都将起作用。
;
; 本指令自 PHP 4.3.2 起可用。
; (本指令只能设置在 php.ini 中。例如你不能将其设置在 httpd.conf 中。)

disable_classes =

; Colors for Syntax Highlighting mode.
; Anything that's acceptable in <span style="color: ???????"> would work.

; 语法高亮模式的色彩。
; 只要能被 <span style="color: ???????"> 接受的东西就能正常工作。

;highlight.string = #DD0000
;highlight.comment = #FF9900
;highlight.keyword = #007700
;highlight.bg = #FFFFFF
;highlight.default = #0000BB
;highlight.html = #000000

; If enabled, the request will be allowed to complete even if the user aborts
; the request. Consider enabling it if executing long request, which may end up
; being interrupted by the user or a browser timing out.
;ignore_user_abort = On

; Determines the size of the realpath cache to be used by PHP.
; This value should be increased on systems where PHP opens
; many files to reflect the quantity of the file operations performed.

; 指定 PHP 使用的 realpath(规范化的绝对路径名)缓冲区大小。
; 在 PHP 打开大量文件的系统上应当增大该值以提高性能。

;realpath_cache_size = 16k

; Duration of time, in seconds for which to cache realpath information for a given
; file or directory.
; For systems with rarely changing files, consider increasing this value.

; 针对特定文件或者目录的 realpath 缓冲区中信息的有效期(秒)。
; 对文件很少变动的系统,可以增大该值以提高性能。

;realpath_cache_ttl = 120

 

;;;;;;;;;;;;;;;;;;;
; Misc ;
;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;
; 杂项 ;
;;;;;;;;;;;;;;;;;;;

; Decides whether PHP may expose the fact that it is installed on the server
; (e.g. by adding its signature to the Web server header).
; It is no security threat in any way, but it makes it possible to determine
; whether you use PHP on your server or not.

; 决定 PHP 是否暴露它被安装在服务器上的事实(比如,出现在 http 头中)。
; (我个人的意见,在出现什么 power-by 的 header 的时候,把这关掉。)
; 它不会有安全上的威胁,但它使得检查你的服务器上是否安装了 PHP 成为了可能。

expose_php = On

 

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;
; 资源限制 ;
;;;;;;;;;;;;;;;;;;;

; Maximum execution time of each script, in seconds
; 每个脚本最多允许执行时间,按秒计。0 表示没有限制。默认为 30 秒。
; 这个选项有助于阻止劣质脚本无休止的占用服务器资源。
; 这个选项仅影响脚本本身的运行时间。任何其它花费在脚本运行之外的时间,
; 如用 system()/sleep() 函数的使用、数据库查询、文件上传等,都不包括在内。
; 在安全模式下,你不能用 ini_set() 在运行时改变这个设置。

max_execution_time = 30

; Maximum amount of time each script may spend parsing request data
; 每个脚本解析输入数据的最多允许时间(POST、GET、upload),按秒计。
max_input_time = 60

; Maximum input variable nesting level
; 最大的输入变量的镶套层次。
;max_input_nesting_level = 64

; Maximum amount of memory a script may consume (128MB)
; 一个脚本所能够申请到的最大内存字节数。默认是 128MB。
; 这有助于防止劣质脚本消耗完服务器上的所有内存。
; (要使用此指令必须在编译的时候激活。因此 configure 一行中应该
; 包括:--enable-memory-limit。如果要取消内存限制,则必须将其设为 -1。
; 自 php 4.3.2 起,当设置了本指令后,memory_get_usage() 函数将变为可用。)

memory_limit = 128M

 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 出错处理和日志 ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; error_reporting is a bit-field.
; Or each number up to get desired error reporting level.
; 错误报告是按位表示的。
; 或者将数字加起来得到想要的错误报告等级。

; E_ALL - All errors and warnings (doesn't include E_STRICT)
; - 所有的错误和警告(不包含 E_STRICT)

; E_ERROR - fatal run-time errors
; - 致命性的运行时错误

; E_RECOVERABLE_ERROR - almost fatal run-time errors
; - 接近致命的运行时错误,若未被捕获则视同 E_ERROR

; E_WARNING - run-time warnings (non-fatal errors)
; - 运行时警告(非致命错误)

; E_PARSE - compile-time parse errors
; - 编译时解析错误

; E_NOTICE - run-time notices (these are warnings which often result
; from a bug in your code, but it's possible that it was
; intentional (e.g., using an uninitialized variable and
; relying on the fact it's automatically initialized to an
; empty string)
; - 运行时提醒(这些警告经常是你的代码的 bug 引起的,
; - 也可能是有意的行为造成的。(如:基于未初始化的变量自动
; - 初始化为一个空字符串的事实而使用一个未初始化的变量)

; E_STRICT - run-time notices, enable to have PHP suggest changes
; to your code which will ensure the best interoperability
; and forward compatibility of your code
; - 编码标准化警告,允许 PHP 建议如何修改代码以确保最佳的互
; - 操作性向前兼容性。

; E_CORE_ERROR - fatal errors that occur during PHP's initial startup
; - 发生于 PHP 启动时初始化过程中的致命错误

; E_CORE_WARNING - warnings (non-fatal errors) that occur during PHP's
; initial startup
; - 发生于 PHP 启动时初始化过程中的警告(非致命错误)

; E_COMPILE_ERROR - fatal compile-time errors
; - 编译时致命错误

; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
; - 编译时警告(非致命错误)

; E_USER_ERROR - user-generated error message
; - 用户自定义的致命错误

; E_USER_WARNING - user-generated warning message
; - 用户自定义的警告

; E_USER_NOTICE - user-generated notice message
; - 用户自定义的提醒
;
; Examples:
; 例子:
;
; - Show all errors, except for notices and coding standards warnings
; - 显示所有的错误,不包括提醒
;error_reporting = E_ALL & ~E_NOTICE
;
; - Show all errors, except for notices
; - 显示所有的错误,不包括提醒和标准代码警告
;error_reporting = E_ALL & ~E_NOTICE | E_STRICT
;
; - Show only errors
; - 仅显示错误
;error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR
;
; - Show all errors, except coding standards warnings
; - 显示所有的错误,不包括标准代码警告
error_reporting = E_ALL

; Print out errors (as a part of the output). For production web sites,
; you're strongly encouraged to turn this feature off, and use error logging
; instead (see below). Keeping display_errors enabled on a production web site
; may reveal security information to end users, such as file paths on your Web
; server, your database schema or other information.

; 显示错误信息(作为输出的一部分)。
; 在最终发布的 Web 站点上,强烈建议你禁用这个功能,并使用错误日志
; 代替(参看下面)。
; 在最终发布的 Web 站点启用这个功能可能暴露一些有关安全的信息给最终用户。
; 例如,你的 Web 服务器上的文件路径、你的数据库架构或别的信息。
;
; possible values for display_errors:
; display_errors的可能值有:
;
; Off - Do not display any errors
; - 不显示任何错误

; stderr - Display errors to STDERR (affects only CGI/CLI binaries!)
; - 显示错误到 STDERR 标准错误(仅影响 CGI/CLI 二进制版本)

; On or stdout - Display errors to STDOUT (default)
; - 显示错误到 STDOUT 标准输出(默认值)
;
; To output errors to STDERR with CGI/CLI:
; 在 CGI/CLI 版本下输出错误到 STDERR
;display_errors = "stderr"


;
; Default
; 默认值
;
display_errors = On

; Even when display_errors is on, errors that occur during PHP's startup
; sequence are not displayed. It's strongly recommended to keep
; display_startup_errors off, except for when debugging.

; 即使启用了 display_erroes 选项,(关闭此参数也将不显示)发生于 PHP 启动过程
; 中的错误也不会被显示。
; 强烈建议你关掉这个功能,除了在调试过程中。

display_startup_errors = Off

; Log errors into a log file (server-specific log, stderr or error_log (below)).
; As stated above, you're strongly advised to use error logging in place of
; error displaying on production web sites.

; 在日志文件里记录错误(服务器指定的日志,stderr 标准错误输出,
; 或 error_log 指定的目录(在下面的))
; 正如上面说明的那样,强烈建议你在最终发布的 web 站点用日志记录错误取代直接
; 错误输出。

log_errors = On

; Set maximum length of log_errors.
; In error_log information about the source is added.
; The default is 1024 and 0 allows to not apply any maximum length at all.

; 设置错误日志文件的最大长度。
; 与错误源相关联的错误信息将被附加。
; 默认值是 1024。设为 0 可以允许无限长度。
; (这里设置的值对显示的和记录的错误以及 $php_errormsg 都有效。)

log_errors_max_len = 1024

; Do not log repeated messages. Repeated errors must occur in same file on same
; line unless ignore_repeated_source is set true.

; 记录错误日志时是否忽略重复的错误信息。
; 如果关闭这个指令,错误信息必须出现在同一个文件的同一行才被忽略。
; 如果打开这个指令,则没有这个限制。

ignore_repeated_errors = Off

; Ignore source of message when ignoring repeated messages. When this setting
; is On you will not log errors with repeated messages from different files or
; source lines.

; 忽略重复的错误信息时忽略重复的错误源。
; 如果打开这个指令,将不会记录不同的出错文件和对应行的错误信息。

ignore_repeated_source = Off

; If this parameter is set to Off, then memory leaks will not be shown (on
; stdout or in the log). This has only effect in a debug compile,
; and if error reporting includes E_WARNING in the allowed list

; 报告内存泄漏。
; 如果关闭该指令,将不记录或者显示内存泄漏。这个指令只在调试编译中起作用,
; 并且必须在 error_reporting 指令中包含 E_WARNING。

report_memleaks = On

;report_zend_debug = 0

; Store the last error/warning message in $php_errormsg (boolean).
; 保存最近一个 错误/警告 消息到变量 $php_errormsg (布尔类型)
track_errors = Off

; Turn off normal error reporting and emit XML-RPC error XML
; 关闭正常的错误报告,并将错误的格式设置为 XML-RPC 错误信息的格式。
;xmlrpc_errors = 0

; An XML-RPC faultCode
; 用作 XML-RPC faultCode 元素的值。
;xmlrpc_error_number = 0

; Disable the inclusion of HTML tags in error messages.
; Note: Never use this feature for production boxes.

; 禁用出错信息中的 HTML 标记。(展示或者存储的错误信息组织为 HTML 格式。)
; 注意:不要在发布的程序中使用这个功能。

;html_errors = Off

; If html_errors is set On PHP produces clickable error messages that direct
; to a page describing the error or function causing the error in detail.
; You can download a copy of the PHP manual from http://www.php.net/docs.php
; and change docref_root to the base URL of your local copy including the
; leading '/'. You must also specify the file extension being used including
; the dot.
; Note: Never use this feature for production boxes.

; 如果启用 html_errors 选项,PHP 将会在出错信息上显示超连接。
; 该链接指向一个说明这个错误或者导致这个错误的函数的详细页面。
; 你可以从http://www.php.net/docs.php下载 PHP 手册,并设置 docref_root 参数,
; 将他指向你本地的手册所在 URL 目录。
; 你还必须设置 "docref_ext" 指令来指定文件的扩展名(必须含有''.'')。
; 注意:不要在发布的程序中使用这个功能。

;docref_root = "/phpmanual/"
;docref_ext = .html

; String to output before an error message.
; 在错误信息前输出的字符串
;error_prepend_string = "<font color=#ff0000>"

; String to output after an error message.
; 在错误信息后输出的字符串
;error_append_string = "</font>"

; Log errors to specified file.
; 记录错误日志到指定文件
error_log = "C:\WINDOWS\temp\php-errors.log"

; Log errors to syslog (Event Log on NT, not valid in Windows 95).
; 记录错误日志到系统日志 syslog
; syslog 表示 NT 下的事件日志(Windows 95下无效)或Unix下的syslog(3))

; 将错误日志记录到哪个文件中。该文件必须对 Web 服务器用户可写。
; 如果此处未设置任何值,则错误将被记录到 Web 服务器的错误日志中。
;error_log = syslog

 

;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;
; 数据处理 ;
;;;;;;;;;;;;;;;;;

; Note - track_vars is ALWAYS enabled as of PHP 4.0.3
; 注意:从 PHP 4.0.3 开始,track_vars 指令总是可用的。

; The separator used in PHP generated URLs to separate arguments.
; Default is "&".

; PHP 所产生的 URLs 中来分隔参数的分隔符。
; 默认值是 "&"

;arg_separator.output = "&amp;"

; List of separator(s) used by PHP to parse input URLs into variables.
; Default is "&".
; NOTE: Every character in this directive is considered as separator!

; PHP 解析输入 URLs 中的变量时使用的分隔符列表。
; 默认值是 "&"
; 注意:字符串中的任何字符都将被看着分割符

;arg_separator.input = ";&"

; This directive describes the order in which PHP registers GET, POST, Cookie,
; Environment and Built-in variables (G, P, C, E & S respectively, often
; referred to as EGPCS or GPC). Registration is done from left to right, newer
; values override older values.

; 这条指令描述了 PHP 注册 GET、POST、Cookie、Environment 和 Built-in 这些
; 变量的顺序。(以 G、P、C、E 和 S 表示,通常以 EGPCS 或 GPC 的方式引用,
; 并使用 getenv() 函数访问环境变量)。
; 按从左到右注册,新值覆盖旧值。

; Built-in variables 应该翻译成“内建变量”,但是其实还有一个更准确的英文
; 名称:Server variables。也就是“服务器变量”。这也是前面为什么用 S 作
; 简写的原因。

; 举例来说,将其设为 "GP",会导致 PHP 完全忽略 Environment、cookies、Built-in 变
; 量,并用 POST 方法的变量覆盖 GET 方法的同名变量。

variables_order = "GPCS"

; Whether or not to register the EGPCS variables as global variables. You may
; want to turn this off if you don't want to clutter your scripts' global scope
; with user data. This makes most sense when coupled with track_vars - in which
; case you can access all of the GPC variables through the $HTTP_*_VARS[] arrays.
;
; You should do your best to write your scripts so that they do not require
; register_globals to be on. Using form variables as globals can easily lead
; to possible security problems, if the code is not very well thought of.

; 是否将这些 EGPCS 变量注册为全局变量。
; 如果你不想让脚本中的全局变量和用户输入的数据搞混的话,请关闭它。
; 这和 track_vars 指令连起来用更有意义。
; 你可以通过 $HTTP_*_VARS[] 数组访问所有 GPC 变量。

; 最好别开启这个功能。
; 如果不是处理得很好的话,表单变量作为全局变量可能会导致安全问题。
; 注:本指令受 variables_order 指令的影响。

; 请注意,register_globals 不能在运行时设定(ini_set()),
; 尽管在主机允许时可以用 .htaccess 来设置。
; 推荐使用 PHP 的预定义变量来替代 $HTTP_*_VARS[] 数组,例如超全局
; 变量:$_ENV,$_GET,$_POST,$_COOKIE 和 $_SERVER
register_globals = Off

; Whether or not to register the old-style input arrays, HTTP_*_VARS
; and friends. If you're not using them, it's recommended to turn them off,
; for performance reasons.

; 是否启用旧式的长式数组(HTTP_*_VARS)。
; 如果你不需要就关闭该选项以获得更好的性能。

register_long_arrays = Off

; This directive tells PHP whether to declare the argv & argc variables (that
; would contain the GET information). If you don't use these variables, you
; should turn it off for increased performance.

; 这条指令告诉 PHP 是否声明 argv 和 argc 变量(其中包含用 GET 方法传来的数据)。
; (注:这里 argv 为变量数组,argc 为变量数组中元素个数)
; 若你不想用这些变量,你应当关掉它以提高性能。

register_argc_argv = Off

; When enabled, the SERVER and ENV variables are created when they're first
; used (Just In Time) instead of when the script starts. If these variables
; are not used within a script, having this directive on will result in a
; performance gain. The PHP directives register_globals, register_long_arrays,
; and register_argc_argv must be disabled for this directive to have any affect.

; 是否仅在第 1 次使用到 $_SERVER 和 $_ENV 变量时才创建它们,而不是在脚本一启动
; 时就自动创建。如果并未在脚本中使用这两个数组,打开该指令将会获得性能上的提升。
; 要想该指令生效,必须关闭 register_globals、register_long_arrays 和
; register_argc_argv指令。

auto_globals_jit = On

; Maximum size of POST data that PHP will accept.
; PHP 将接受的 POST 数据最大字节长度。

; 本指令也影响到文件上传。
; 如果 POST 数据超出限制,那么 $_POST 和 $_FILES 将会为空。
; 要上传大文件,本指令必须大于 "upload_max_filesize" 指令的值。
; 如果启用 memory_limit 指令,"memory_limit" 也会影响文件上传。
; "memory_limit" 不能比 "post_max_size" 小,否则在上传大文件可能会出错。

post_max_size = 8M

 

;;;;;;;;;;;;;;;;;
; Magic quotes ;;
;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;
; 魔术引用 ;;;
;;;;;;;;;;;;;;;;;

; PHP 6 将取消魔术引用

; Magic quotes for incoming GET/POST/Cookie data.
; 在输入的 GET/POST/Cookie 数据里使用自动字符串转义(限于英文单引号、英文
; 双引号、NULL 等 3 个 ASCII 字符)。
; (若将本指令与 magic_quotes_sybase 指令同时打开,则仅将单引号(')转义为(''),
; 其它特殊字符将不被转义,即( "  NULL )将保持原样!!)
; (建议关闭此功能,因为它在处理双字节汉字的时候可能会破坏某些文字和特殊字符)
magic_quotes_gpc = Off

; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
; 对运行时从外部资源产生的数据使用自动字符串转义。
; 例如:用 SQL 查询得到的数据,用 exec() 函数得到的数据,文本文件等等。
magic_quotes_runtime = Off

; Use Sybase-style magic quotes (escape ' with '' instead of \').
; 采用 Sybase 形式的自动字符串转义(用 '' 表示 ' 而不用 \')
magic_quotes_sybase = Off

; Automatically add files before or after any PHP document.
; 自动在 PHP 文档之前和之后增加文件。
; 该文件就像调用了 include() 函数一样被包含进来,因此会使用 "include_path"。
; 如果脚本通过 exit() 终止,则自动后缀不会发生。
auto_prepend_file =
auto_append_file =

; As of 4.0b4, PHP always outputs a character encoding by default in
; the Content-type: header. To disable sending of the charset, simply
; set it to be empty.

; 从 4.0b4 版本开始,PHP 总是默认在 "Content-type:" 头中设置输出文档
; 的 MIME 类型和字符集的编码方式。
; 要让输出字符集失效,只要设置为空或注释掉即可。
;
; PHP's built-in default is text/html
; PHP 的内置默认是输出 "Content-Type:text/html"。

; 如果去掉 default_charset 前面的分号,并将其设置为 iso-8859-1
; 那么会输出 "Content-Type: text/html; charset=iso-8859-1"

default_mimetype = "text/html"
default_charset = "GBK"

; Always populate the $HTTP_RAW_POST_DATA variable.
; 总是填充 $HTTP_RAW_POST_DATA 变量。

; "HTTP_RAW_POST_DATA" 的意思是 "HTTP 的原始 POST 数据"。
; 本指令仅在遇到不能识别的MIME类型的数据时才产生。
; 本指令对于 enctype="multipart/form-data" 的表单数据不可用。
;always_populate_raw_post_data = On

 

;;;;;;;;;;;;;;;;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;
; 被包含的路径和目录 ;
;;;;;;;;;;;;;;;;;;;;;;;;;

; 指定一组目录用于 require()、include() 和 fopen_with_path() 函数来寻找文件。
; 格式和系统的 PATH 环境变量类似:
; 一组目录的列表,在 UNIX 下用冒号分隔,在 Windows 下用分号分隔。
; 在包含路径中使用 '.' 可以允许相对路径,它表示当前目录。

; UNIX: "/path1:/path2"
;include_path = ".:/php/includes"
;
; Windows: "\path1;\path2"
;include_path = ".;c:\php\includes"

; The root of the PHP pages, used only if nonempty.
; if PHP was not compiled with FORCE_REDIRECT, you SHOULD set doc_root
; if you are running php as a CGI under any web server (other than IIS)
; see documentation for security issues.
; The alternate is to use the cgi.force_redirect configuration below.

; PHP 页面在服务器上的根路径,仅在非空时有效。
; 如果 PHP 编译时没有指定 FORCE_REDIRECT,并且在非 IIS 服务器
; 上以 CGI 方式运行,则必须设置此项。(参见手册中的安全部分)
; 替代方案是使用下面的 "cgi.force_redirect" 指令。
; (如果 PHP 被配置为安全模式,则此目录之外的文件一概不被解析。)
doc_root =

; The directory under which PHP opens the script using /~username used only
; if nonempty.

; 告知 php 在使用 /~username 打开脚本时到哪个目录下去找,仅在非空时有效。
; (也就是在用户目录之下使用 PHP 文件的基本目录名,例如:public_html)
user_dir =

; Directory in which the loadable extensions (modules) reside.
; 存放可加载的扩展库(模块)的目录。
; (也就是 PHP 用来寻找动态链接扩展库的目录。)
extension_dir = "C:\Program Files\PHP\ext"

; Whether or not to enable the dl() function. The dl() function does NOT work
; properly in multithreaded servers, such as IIS or Zeus, and is automatically
; disabled on them.
; 是否启用 dl() 函数。在多线程的服务器(如,IIS 或 Zeus)上 dl() 函数都不能
; 很好地工作,并设置为禁止。

; dl() 函数仅在将 PHP 作为 apache 模块安装时才有效。
; 禁用 dl() 函数主要是出于安全考虑,因为它可以绕过 open_basedir 指令的限制。
; 在安全模式下始终禁用 dl() 函数,而不管此处如何设置。
enable_dl = Off

; cgi.force_redirect is necessary to provide security running PHP as a CGI under
; most web servers. Left undefined, PHP turns this on by default.
; You can turn it off here AT YOUR OWN RISK.
; **You CAN safely turn this off for IIS, in fact, you MUST.**

; 打开 cgi 的强制重定向功能,目的为以 CGI 方式运行的 php 提供了必要的安全保护。
; 默认打开该参数。你若自己关闭了它,请自己负责后果。
; 注意:在 IIS/OmniHTTPD/Xitami 上则必须关闭它!

;cgi.force_redirect = 1

; if cgi.nph is enabled it will force cgi to always sent Status: 200 with
; every request.
; 如果该参数打开,那么它会强制 cgi 对每个 http 请求始终发送 "Status: 200" 状态码。
;cgi.nph = 1

; if cgi.force_redirect is turned on, and you are not running under Apache or Netscape
; (iPlanet) web servers, you MAY need to set an environment variable name that PHP
; will look for to know it is OK to continue execution. Setting this variable MAY
; cause security issues, KNOW WHAT YOU ARE DOING FIRST.

; 如果打开了 cgi.force_redirect,并且你没有将 php 运行
; 在 Apache 或 Netscape(iPlanet) 服务器上,可能需要设定一个 cgi 重定向环境
; 变量名,PHP 将去寻找它来知道可以继续执行下去。
; 设置这个变量会导致安全漏洞,请务必在设置前搞清楚自己在做什么。

;cgi.redirect_status_env =

; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI. PHP's
; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
; what PATH_INFO is. For more information on PATH_INFO, see the cgi specs. Setting
; this to 1 will cause PHP CGI to fix it's paths to conform to the spec. A setting
; of zero causes PHP to behave as before. Default is 1. You should fix your scripts
; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.

; 为 CGI 提供真正的 PATH_INFO/PATH_TRANSLATED 支持。
; PHP 的以前的行为是将 PATH_TRANSLATED 设置为 SCRIPT_FILENAME,并且不要
; 弄清 PATH_INFO 是什么。有关 PATH_INFO 的更多信息,请参阅 CGI 规范。
; 将其设置为 1 将导致 PHP CGI 修复其路径以符合规范。
; 设置为 0 会导致 PHP 的行为像以前一样。
; 默认值是 1。
; 您应该修复脚本以使用 SCRIPT_FILENAME 而不是 PATH_TRANSLATED。

;cgi.fix_pathinfo = 1

; FastCGI under IIS (on WINNT based OS) supports the ability to impersonate
; security tokens of the calling client. This allows IIS to define the
; security context that the request runs under. mod_fastcgi under Apache
; does not currently support this feature (03/17/2002)
; Set to 1 if running under IIS. Default is zero.

; IIS 中的 FastCGI 支持模仿客户端安全令牌的能力。
; 这使得 IIS 能够定义运行时所基于的请求的安全上下文。
; Apache 中的 mod_fastcgi 不支持此特性(03/17/2002)
; 如果在 IIS 中运行则设为 1。
; 默认值为 0。

;fastcgi.impersonate = 1

; Disable logging through FastCGI connection
; 是否记录通过 FastCGI 进行的连接
; 禁止 FastCGI 日志
;fastcgi.logging = 0

; cgi.rfc2616_headers configuration option tells PHP what type of headers to
; use when sending HTTP response code. If it's set 0 PHP sends Status: header that
; is supported by Apache. When this option is set to 1 PHP will send
; RFC2616 compliant header.
; Default is zero.

; 指定 PHP 在发送 HTTP 响应代码时使用何种报头。
; 若设为 0,则 Apache 支持发送一个 "Status:" 报头。
; 若设为 1,则 PHP 使用 RFC2616 标准的头。
; 默认值为 0。

; 除非你知道自己在做什么,否则保留其值为 0。

;cgi.rfc2616_headers = 0

 

;;;;;;;;;;;;;;;;
; File Uploads ;
;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;
; 文件上传 ;
;;;;;;;;;;;;;;;;

; Whether to allow HTTP file uploads.
; 是否允许用 HTTP 方式上传文件
; 参见 upload_max_filesize,upload_tmp_dir,post_max_size 指令
file_uploads = On

; Temporary directory for HTTP uploaded files (will use system default if
; not specified).
; 用于 HTTP 上传的文件的临时目录(未指定则使用系统默认)
; (必须是 PHP 进程用户可写的目录。)
upload_tmp_dir = "C:\WINDOWS\Temp"

; Maximum allowed size for uploaded files.
; 允许上传文件的最大尺寸
upload_max_filesize = 2M

; Maximum number of files that can be uploaded via a single request
; 单次请求最多上传多少个文件(默认为 20 个)
max_file_uploads = 20

 

;;;;;;;;;;;;;;;;;;
; Fopen wrappers ;
;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;
; Fopen 封装 ;
;;;;;;;;;;;;;;;;;;

; Whether to allow the treatment of URLs (like http:// or ftp://) as files.
; 是否允许把远程 URLs(如,http:// 或 ftp://)当作文件打开
allow_url_fopen = On

; Whether to allow include/require to open URLs (like http:// or ftp://) as files.
; 是否允许 include/require 把远程 URLs(如,http:// 或 ftp://)当作文件打开
allow_url_include = Off

; Define the anonymous ftp password (your email address)
; 定义匿名 ftp 的密码(一个 email 地址)
;from="john@doe.com"

; Define the User-Agent string
; 定义 "User-Agent" 字符串
; user_agent="PHP"

; Default timeout for socket based streams (seconds)
; 套接字超时,单位是秒
default_socket_timeout = 60

upload_tmp_dir="C:\WINDOWS\Temp"
session.save_path="C:\WINDOWS\Temp"
error_log="C:\WINDOWS\temp\php-errors.log"

; If your scripts have to deal with files from Macintosh systems,
; or you are running on a Mac and need to deal with files from
; unix or win32 systems, setting this flag will cause PHP to
; automatically detect the EOL character in those files so that
; fgets() and file() will work regardless of the source of the file.

; 是否让 PHP 自动侦测行结束符(EOL)。

; 如果的你脚本必须处理 Macintosh 文件,或者你运行在 Macintosh上,
; 同时又要处理 unix 或 win32 文件,设置这个标志可以让 PHP 自动侦察
; 文件结束符,以便 fgets() 和 file() 函数正常工作。
; 默认值是 Off,因为在检测第 1 行的 EOL 习惯时会有很小的性能损失,
; 而且在 Unix 系统下使用回车符(CR)作为项目分隔符的人们会遭遇向下不兼容的行为。

;auto_detect_line_endings = Off

 

;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;
; 动态扩展 ;
;;;;;;;;;;;;;;;;;;;;;;

; If you wish to have an extension loaded automatically,
; use the following syntax:
; 若你希望一个扩展库自动加载,用下面的语法:
;
; extension=modulename.extension
;
; For example, on Windows:
; 例如,在 windows 上,
;
; extension=msql.dll
;
; ... or under UNIX:
; 或者在 UNIX 下,
;
; extension=msql.so
;
; Note that it should be the name of the module only; no directory information
; needs to go here.
; Specify the location of the extension with the extension_dir directive above.

; 注意,这里应当是模块的名字,不需要目录信息放在里面。
; 用上面的 extension_dir 指令指定扩展库的位置。


; Windows Extensions
; Windows 扩展

; Note that ODBC support is built in, so no dll is needed for it.
; Note that many DLL files are located in the extensions/ (PHP 4) ext/ (PHP 5)
; extension folders as well as the separate PECL DLL download (PHP 5).
; Be sure to appropriately set the extension_dir directive.
; 注意,ODBC是内置支持的,所以不需要使用DLL。(MySQL 没有内置)

 

;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;
; 模块设定 ;
;;;;;;;;;;;;;;;;;;;


[Date]
; Defines the default timezone used by the date functions
; 用于所有日期和时间函数的默认时区。
; 中国应当使用 "PRC"
; 应用时区的优先顺序为:
; 1. 用 date_default_timezone_set() 函数设定的时区(如果设定了的话)
; 2. TZ 环境变量(如果非空的话)
; 3. 该指令的值(如果设定了的话)
; 4. PHP 自己推测(如果操作系统支持)
; 5. 如果以上都不成功,则使用 "UTC"
date.timezone = PRC

; 以下4个配置选项目前仅用于date_sunrise()和date_sunset()函数。
; 纬度
;date.default_latitude = 31.7667

; 经度
;date.default_longitude = 35.2333

; 日出天顶
;date.sunrise_zenith = 90.583333

; 日落天顶
;date.sunset_zenith = 90.583333


[filter]
;filter.default = unsafe_raw
;filter.default_flags =


[iconv]
;iconv.input_encoding = ISO-8859-1
;iconv.internal_encoding = ISO-8859-1
;iconv.output_encoding = ISO-8859-1


[sqlite]
;sqlite.assoc_case = 0


[Pcre]
;PCRE library backtracking limit.
; PCRE 的最大回溯(backtracking)步数。
;pcre.backtrack_limit = 100000

; PCRE library recursion limit.
; Please note that if you set this value to a high number you may consume all
; the available process stack and eventually crash PHP (due to reaching the
; stack size limit imposed by the Operating System).

; PCRE 的最大递归(recursion)深度。
; 如果你将该值设的非常高,将可能耗尽进程的栈空间,导致 PHP 崩溃(直到达到系统
; 限制的堆栈大小)。
;pcre.recursion_limit = 100000


[Syslog]
; Whether or not to define the various syslog variables (e.g. $LOG_PID,
; $LOG_CRON, etc.). Turning it off is a good idea performance-wise.
; In runtime, you can define these variables by calling
; define_syslog_variables().

; 是否定义各种的系统日志变量(如:$LOG_PID、$LOG_CRON 等等。)
; 关掉它是个提高效率的好主意。
; 运行时,你可以调用函数 define_syslog_variables(),来定义这些变量。
define_syslog_variables = Off


[mail function]
; 要使邮件函数可用,PHP 必须在编译时能够访问 sendmail 程序。

; For Win32 only.
; 仅用于 Win32 系统。
; (mail() 函数中用来发送邮件的 SMTP 服务器的主机名称或者 IP 地址。)
SMTP = localhost

; SMTP 服务器的端口号。
; 仅用于 Win32 系统。
smtp_port = 25

; For Win32 only.
; 仅用于 Win32 系统。
;
; 发送邮件时使用的 "From:" 头中的邮件地址。
; 该选项还同时设置了 "Return-Path:" 头。
;sendmail_from = me@example.com

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; 仅用于 Unix 系统。也可支持参数(默认的是 'sendmail -t -i')
;sendmail_path =

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
; 作为额外的参数传递给 sendmail 库的强制指定的参数附加值。
; 这些参数总是会替换掉 mail() 的第 5 个参数,即使在安全模式下也是如此。
;mail.force_extra_parameters =


[SQL]
; 是否使用 SQL 安全模式。
; 如果打开,指定默认值的数据库连接函数将会使用这些默认值代替支持的参数。
; 对于每个不同数据库的连接函数,其默认值请参考相应的手册页面。
sql.safe_mode = Off


[ODBC]
; 一下 3 个暂未实现
;odbc.default_db = Not yet implemented
;odbc.default_user = Not yet implemented
;odbc.default_pw = Not yet implemented

; Allow or prevent persistent links.
; 是否允许持久连接
odbc.allow_persistent = On

; Check that a connection is still valid before reuse.
; 在重用前检查连接是否还可用
odbc.check_persistent = On

; Maximum number of persistent links. -1 means no limit.
; 每个进程中允许的最大持久连接数。-1 代表无限制
odbc.max_persistent = -1

; Maximum number of links (persistent + non-persistent). -1 means no limit.
; 每个进程中允许的最大连接数(持久和非持久)。-1 代表无限制
odbc.max_links = -1

; Handling of LONG fields. Returns number of bytes to variables.
; 0 means passthru.
; 处理 LONG 类型的字段。返回变量的字节数,0 代表通过
odbc.defaultlrl = 4096

; Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char.
; See the documentation on odbc_binmode and odbc_longreadlen for an explanation
; of uodbc.defaultlrl and uodbc.defaultbinmode
; 处理二进制数据。0 代表通过。1 返回原样,2 转换为字符
; 参见 odbc_binmode 和 odbc_longreadlen 文档以
; 得到 uodbc.defaultlrl 和 uodbc.defaultbinmode 的解释。
odbc.defaultbinmode = 1


[MySQL]
; Allow or prevent persistent links.
; 允许或禁止持久连接
mysql.allow_persistent = On

; Maximum number of persistent links. -1 means no limit.
; 持久连接的最大数。-1 表示无限制
mysql.max_persistent = -1

; Maximum number of links (persistent + non-persistent). -1 means no limit.
; 连接的最大数目(持久和非持久)。-1 表示无限制
mysql.max_links = -1

; Default port number for mysql_connect(). If unset, mysql_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order).
; Win32 will only look at MYSQL_PORT.

; mysql_connect() 使用的默认端口。如不设置,mysql_connect() 将使用
; 变量 $MYSQL_TCP_PORT,或在 /etc/services 下的 mysql-tcp 条目(unix),
; 或在编译时定义的 MYSQL_PORT(按这样的顺序)
; 在 Win32 环境将仅查找 MYSQL_PORT。
mysql.default_port =

; Default socket name for local MySQL connects.
; If empty, uses the built-in MySQL defaults.
; 用于本地 MySQL 连接的默认的套接字名。为空,使用 MySQL 内置默认值。
mysql.default_socket =

; Default host for mysql_connect() (doesn't apply in safe mode).
; mysql_connect() 默认使用的主机(安全模式下无效)
mysql.default_host =

; Default user for mysql_connect() (doesn't apply in safe mode).
; mysql_connect() 默认使用的用户名(安全模式下无效)
mysql.default_user =

; Default password for mysql_connect() (doesn't apply in safe mode).
; Note that this is generally a *bad* idea to store passwords in this file.
; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password")'
; and reveal this password! And of course, any users with read access to this
; file will be able to reveal the password as well.

; mysql_connect() 默认使用的密码(安全模式下无效)
; 注意,在这个文件下保存密码通常是一个*坏*主意。
; *任何*可以使用 PHP 访问权限的用户可以运行
; 'echo cfg_get_var("mysql.default_password")' 语句来显示那个密码!
; 而且当然地,任何有读该文件权力的用户也能看到那个密码。
mysql.default_password =

; Maximum time (in seconds) for connect timeout. -1 means no limit
; 连接超时(秒),-1 表示无限制。
; 在 Linux 中,这个参数设定了等待来自服务器的响应的时长。
mysql.connect_timeout = 60

; Trace mode. When trace_mode is active (=On), warnings for table/index scans and
; SQL-Errors will be displayed.
; 跟踪模式。当打开这个特性后,扫描表或索引时 SQL 的警告将会被显示。
mysql.trace_mode = Off


[MySQLi]

; Maximum number of links. -1 means no limit.
; 每个进程中允许的最大连接数(持久和非持久)。-1 代表无限制
mysqli.max_links = -1

; Default port number for mysqli_connect(). If unset, mysqli_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
; compile-time value defined MYSQL_PORT (in that order).
; Win32 will only look at MYSQL_PORT.

; mysqli_connect() 使用的默认端口。如不设置,mysqli_connect() 将使用
; 变量 $MYSQL_TCP_PORT,或在 /etc/services 文件下的 mysql-tcp 项(unix),
; 或在编译时指定的 MYSQL_PORT(按这样的顺序)
; 在 Win32 环境将仅查找 MYSQL_PORT。
mysqli.default_port = 3306

; Default socket name for local MySQL connects.
; If empty, uses the built-in MySQL defaults.
; 用于本机 MySQL 连接的默认的套接字名。为空时使用 MySQL 内置的默认值。
mysqli.default_socket =

; Default host for mysql_connect() (doesn't apply in safe mode).
; mysqli_connect() 默认使用的主机(安全模式下无效)
mysqli.default_host =

; Default user for mysql_connect() (doesn't apply in safe mode).
; mysqli_connect() 默认使用的用户名(安全模式下无效)
mysqli.default_user =

; Default password for mysqli_connect() (doesn't apply in safe mode).
; Note that this is generally a *bad* idea to store passwords in this file.
; *Any* user with PHP access can run 'echo get_cfg_var("mysqli.default_pw")
; and reveal this password! And of course, any users with read access to this
; file will be able to reveal the password as well.

; mysqli_connect() 默认使用的密码(安全模式下无效)
; 注意,在这个文件下保存密码通常是一个*坏*主意。
; *任何*可以使用 PHP 访问权限的用户可以运行
; 'echo cfg_get_var("mysqli.default_pw")' 语句来显示那个密码!
; 而且当然地,任何有读该文件权力的用户也能看到那个密码。
mysqli.default_pw =

; Allow or prevent reconnect
; 连接丢失时是否自动重新连接。
mysqli.reconnect = Off


[mSQL]

; Allow or prevent persistent links.
; 允许或禁止持久连接
msql.allow_persistent = On

; Maximum number of persistent links. -1 means no limit.
; 最大持久连接数。-1 代表无限制
msql.max_persistent = -1

; Maximum number of links (persistent+non persistent). -1 means no limit.
; 最大连接数(持久和非持久)。-1 代表无限制
msql.max_links = -1


[OCI8]

; Oracle 客户端扩展(OCI8)
; enables privileged connections using external credentials (OCI_SYSOPER, OCI_SYSDBA)
;oci8.privileged_connect = Off

; Connection: The maximum number of persistent OCI8 connections per
; process. Using -1 means no limit.
;oci8.max_persistent = -1

; Connection: The maximum number of seconds a process is allowed to
; maintain an idle persistent connection. Using -1 means idle
; persistent connections will be maintained forever.
;oci8.persistent_timeout = -1

; Connection: The number of seconds that must pass before issuing a
; ping during oci_pconnect() to check the connection validity. When
; set to 0, each oci_pconnect() will cause a ping. Using -1 disables
; pings completely.
;oci8.ping_interval = 60

; Tuning: This option enables statement caching, and specifies how
; many statements to cache. Using 0 disables statement caching.
;oci8.statement_cache_size = 20

; Tuning: Enables statement prefetching and sets the default number of
; rows that will be fetched automatically after statement execution.
;oci8.default_prefetch = 10

; Compatibility. Using On means oci_close() will not close
; oci_connect() and oci_new_connect() connections.
;oci8.old_oci_close_semantics = Off


[PostgresSQL]

; Allow or prevent persistent links.
; 允许或禁止持久连接
pgsql.allow_persistent = On

; Detect broken persistent links always with pg_pconnect().
; Auto reset feature requires a little overheads.
; 检测用在 pg_pconnect() 上中断了的持久连接,需要一些额外开销。
pgsql.auto_reset_persistent = Off

; Maximum number of persistent links. -1 means no limit.
; 每个进程中允许的最大持久连接数。-1 代表无限制
pgsql.max_persistent = -1

; Maximum number of links (persistent+non persistent). -1 means no limit.
; 每个进程中允许的最大连接数(持久和非持久)。-1 代表无限制
pgsql.max_links = -1

; Ignore PostgreSQL backends Notice message or not.
; Notice message logging require a little overheads.
; 是否忽略 PostgreSQL 后端的通告消息。
; 记录后端的通告消息需要一些额外开销。
pgsql.ignore_notice = 0

; Log PostgreSQL backends Notice message or not.
; Unless pgsql.ignore_notice=0, module cannot log notice message.
; 是否在日志中记录 PostgreSQL 后端的通告消息。
; 除非 pgsql.ignore_notice=0,否则无法记录。
pgsql.log_notice = 0


[Sybase]

; Allow or prevent persistent links.
; 允许或禁止持久连接
sybase.allow_persistent = On

; Maximum number of persistent links. -1 means no limit.
; 每个进程中允许的最大持久连接数。-1 代表无限制
sybase.max_persistent = -1

; Maximum number of links (persistent + non-persistent). -1 means no limit.
; 每个进程中允许的最大连接数(持久和非持久)。-1 代表无限制
sybase.max_links = -1

;sybase.interface_file = "/usr/sybase/interfaces"

; Minimum error severity to display.
; 显示错误的最低严重性
sybase.min_error_severity = 10

; Minimum message severity to display.
; 显示消息的最低重要性
sybase.min_message_severity = 10

; Compatibility mode with old versions of PHP 3.0.
; If on, this will cause PHP to automatically assign types to results according
; to their Sybase type, instead of treating them all as strings.
; This compatibility mode will probably not stay around forever, so try applying
; whatever necessary changes to your code, and turn it off.

; 与 PHP 3 兼容的模式。
; 若打开,这将导致 PHP 自动根据结果的 Sybase 类型赋值,而不是把它们全当成字符串。
; 这个兼容模式不会永远保留,将来会被丢弃。因此将你的代码进行必要的修改并将该项关闭。
sybase.compatability_mode = Off


[Sybase-CT]

; Allow or prevent persistent links.
; 允许或禁止持久连接
sybct.allow_persistent = On

; Maximum number of persistent links. -1 means no limit.
; 每个进程中允许的最大持久连接数。-1 代表无限制
sybct.max_persistent = -1

; Maximum number of links (persistent + non-persistent). -1 means no limit.
; 每个进程中允许的最大连接数(持久和非持久)。-1 代表无限制
sybct.max_links = -1

; Minimum server message severity to display.
; 显示服务端错误的最低严重性
sybct.min_server_severity = 10

; Minimum client message severity to display.
; 显示客户端错误的最低严重性
sybct.min_client_severity = 10


[bcmath]

; Number of decimal digits for all bcmath functions.
; 用于所有 bcmath 函数的十进制数数字的个数
bcmath.scale = 0


[browscap]

;browscap = extra/browscap.ini
;browscap = c:/windows/system32/inetsrv/browscap.ini ;winxp
;browscap = c:/winnt/system32/inetsrv/browscap.ini ;win2000
; 只有 PWS 和 IIS 需要这个设置


[Informix]

; Default host for ifx_connect() (doesn't apply in safe mode).
; ifx_connect() 默认使用的主机(安全模式下无效)
ifx.default_host =

; Default user for ifx_connect() (doesn't apply in safe mode).
; ifx_connect() 默认使用的用户名(安全模式下无效)
ifx.default_user =

; Default password for ifx_connect() (doesn't apply in safe mode).
; ifx_connect() 默认使用的密码(安全模式下无效)
ifx.default_password =

; Allow or prevent persistent links.
; 允许或禁止持久连接
ifx.allow_persistent = On

; Maximum number of persistent links. -1 means no limit.
; 每个进程中允许的最大持久连接数。-1 代表无限制
ifx.max_persistent = -1

; Maximum number of links (persistent + non-persistent). -1 means no limit.
; 每个进程中允许的最大连接数(持久和非持久)。-1 代表无限制
ifx.max_links = -1

; If on, select statements return the contents of a text blob instead of its id.
; 若打开,select状态符返回一个"text blob"字段的内容,而不是它的id
ifx.textasvarchar = 0

; If on, select statements return the contents of a byte blob instead of its id.
; 若打开,select状态符返回一个"byte blob"字段的内容,而不是它的id
ifx.byteasvarchar = 0

; Trailing blanks are stripped from fixed-length char columns.
; May help the life of Informix SE users.
; 追踪从固定长度的字符列里剥离的空格。
; 可能对 Informix SE 用户有效。
ifx.charasvarchar = 0

; If on, the contents of text and byte blobs are dumped to a file instead of
; keeping them in memory.
; 若打开,text 和 byte blobs 的内容被导出到一个文件而不是保存到内存。
ifx.blobinfile = 0

; NULL's are returned as empty strings, unless this is set to 1.
; In that case, NULL's are returned as string 'NULL'.
; 设为 0,NULL 被作为空字串返回。
; 设为 1,NULL 作为字串 "NULL" 返回。
ifx.nullformat = 0


[Session]

; 注意,除非使用 session_register() 函数或 $_SESSION 注册了一个变量。
; 否则不管是否使用了 session_start() 函数,都不会自动添加任何 session 记录。
; 包括 resource 变量或有循环引用的对象包含指向自身的引用的对象,
; 不能保存在会话中。register_globals 指令会影响到会话变量的存储和恢复。

; Handler used to store/retrieve data.
; 用于保存/检索与会话关联的数据的处理器名字,默认是文件(files)。

; (如果想要使用自定义的处理器,如基于数据库的处理器,可用 "user"。)
session.save_handler = files

; Argument passed to save_handler.
; In the case of files, this is the path where data files are stored.
; Note: Windows users have to change this variable in order to use
; PHP's session functions.
;
; 被传递到 save_handler 指定处理程序的参数。
; 在指定为文件(files)的情况下,这个参数指定了会话数据文件的保存路径。
; 注意:Windows 用户必须修改此参数才能使用会话相关函数。
;
; As of PHP 4.0.1, you can define the path as:
; 从 PHP 4.0.1 开始,可以像下面那样定义路径:
;
; session.save_path = "N;/path"
;
; where N is an integer. Instead of storing all the session files in
; /path, what this will do is use subdirectories N-levels deep, and
; store the session data in those directories. This is useful if you
; or your OS have problems with lots of files in one directory, and is
; a more efficient layout for servers that handle lots of sessions.
;
; 这里 N 是一个整数。(表示每个目录下最多保存的会话文件数量。)
; N 表示可以使用 N 层深度的子目录来保存会话数据文件,而不是将所有数据
; 文件都保存在一个目录下。如果在一个文件夹保存大量数据文件会有困难,
; 那么这个办法会很有用。这有助于提高服务器下海量会话的性能。

; NOTE 1: PHP will not create this directory structure automatically.
; You can use the script in the ext/session dir for that purpose.
; NOTE 2: See the section on garbage collection below if you choose to
; use subdirectories for session storage
;
; 注意1:PHP 不会自动建立这些文件夹结构。你可以使用 ext/session 目录
; 下的脚本来做这件事情。
; 注意2:如果用多个子目录来存储会话数据,那么参见下面有关垃圾回收的章节。

; The file storage module creates files using mode 600 by default.
; 文件存储模块用默认的 600 建立会话数据文件。

; You can change that by using
; 可以用以下方法改变
;
; session.save_path = "N;MODE;/path"
;
; where MODE is the octal representation of the mode.
; MODE 必须用八进制数来表示。
; (其默认值是 600,等于十进制的 384。)

; Note that this does not overwrite the process's umask.
; 注意:这并不会改写进程掩码

; Windows 下默认为临时文件夹路径。
;session.save_path = "/tmp"

; Whether to use cookies.
; 是否使用 cookie 在客户端保存 session id,默认为1(使用)
session.use_cookies = 1

;session.cookie_secure =

; This option enables administrators to make their users invulnerable to
; attacks which involve passing session ids in URLs; defaults to 0.

; 只使用 Cookie 来承载会话,默认为0(关闭)
; 打开这个选项可以避免用 URL 传递会话带来的安全问题。
; 但是禁用 Cookie 的客户端将使 session 无法工作。

;session.use_only_cookies = 1

; Name of the session (used as cookie name).
; 用在 cookie 里的会话标识名,只能包含字母和数字。
session.name = PHPSESSID

; Initialize session on request startup.
; 在客户访问任何页面时自动初始化会话,默认禁止。
; (因为类定义必须在 session 启动之前被载入,所以若打开这个选项,你就不能
; 在 sessions 中存放对象。)
session.auto_start = 0

; Lifetime in seconds of cookie or, if 0, until browser is restarted.
; session_cookie的有效期,单位秒。若为 0,则仅在浏览器进程存在时有效。
session.cookie_lifetime = 0

; The path for which the cookie is valid.
; session_cookie 的作用路径
session.cookie_path = /

; The domain for which the cookie is valid.
; session_cookie 的作用域,默认为空。
session.cookie_domain =

; Whether or not to add the httpOnly flag to the cookie, which makes it inaccessible to browser scripting languages such as JavaScript.
session.cookie_httponly =

; Handler used to serialize data.
; php is the standard serializer of PHP.
; 用来序列化/解序列化数据的处理程序。
; php 是 PHP 的标准序列化/解序列化处理程序。
session.serialize_handler = php

; Define the probability that the 'garbage collection' process is started
; on every session initialization.
; The probability is calculated by using gc_probability/gc_divisor,
; e.g. 1/100 means there is a 1% chance that the GC process starts
; on each request.

; 定义在每次初始化会话时,启动垃圾回收(碎片整理)程序的概率。
; 这个回收概率计算公式如下:gc_probability/gc_divisor
; 比如:1/100 表示每一个新会话初始化时,有 1% 的概率会启动垃圾回收程序。

; 按百分比的垃圾回收程序。在每次会话初始化的时候开始的可能性。
session.gc_probability = 1
session.gc_divisor = 1000

; After this number of seconds, stored data will be seen as 'garbage' and
; cleaned up by the garbage collection process.

; 经过此参数所指的秒数后,保存的数据将被视为垃圾并由垃圾回收程序清理。
; (判断的标准是文件建立的时间,而不是最后刷新数据的时间。)
session.gc_maxlifetime = 1440

; NOTE: If you are using the subdirectory option for storing session files
; (see session.save_path above), then garbage collection does *not*
; happen automatically. You will need to do your own garbage
; collection through a shell script, cron entry, or some other method.
; For example, the following script would is the equivalent of
; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
; cd /path/to/sessions; find -cmin +24 | xargs rm

; 注意:如果你使用了子目录来存储会话的数据文件(参见:session.save_path),
; 垃圾回收程序不会自动启动。你必须使用一个你自己编写的 shell 脚本、
; 克隆目录或者其他办法来执行垃圾回收。比如,下面的脚本相当于
; 设置了 "session.gc_maxlifetime = 1440"(24分钟):
;
; cd /path/to/sessions;
; find -cmin +24 | xargs rm

; PHP 4.2 and less have an undocumented feature/bug that allows you to
; to initialize a session variable in the global scope, albeit register_globals
; is disabled. PHP 4.3 and later will warn you, if this feature is used.
; You can disable the feature and the warning separately. At this time,
; the warning is only displayed, if bug_compat_42 is enabled.

; PHP 4.2 之前的版本有一个未注明的特性(也可看作bug):
; 即使在 "register_globals = Off" 的情况下也允许把 session 变量初始化为全局变量,
; 如果你在 PHP 4.3 之后的版本中使用这个特性,会显示一条警告。
; 你可以禁用这个特性和警告。这时候若打开 bug_compat_42,将只显示警告。

session.bug_compat_42 = 0
session.bug_compat_warn = 1

; Check HTTP Referer to invalidate externally stored URLs containing ids.
; HTTP_REFERER has to contain this substring for the session to be
; considered as valid.

; 检查 HTTP 头中的 "Referer" 以判断包含于 URLs 中的会话 id 是否有效。
; HTTP_REFERER 必须包含这个参数指定的字符串,否则 URL 中的会话 id 将被视为无效。
; 默认为空,即不检查。

session.referer_check =

; How many bytes to read from the file.
; 从文件中读取多少字节(entropy:平均信息量)
; 默认为 0,表示禁用。
session.entropy_length = 0

; Specified here to create the session id.
; 指定创建会话 id 的文件夹
session.entropy_file =

;session.entropy_length = 16

;session.entropy_file = /dev/urandom

; Set to {nocache,private,public} to determine HTTP caching aspects
; or leave this empty to avoid sending anti-caching headers.
; 设置为(nocache,private,public)其中的一个,以决定 HTTP 的缓存控制模式,
; 或者设为空以阻止在 http 应答头中发送 anti-caching (禁用缓存)的命令。
session.cache_limiter = nocache

; Document expires after n minutes.
; 文档在 n 分钟后过时。指定会话页面在客户端 cache 中的有效期限
session.cache_expire = 180

; trans sid support is disabled by default.
; Use of trans sid may risk your users security.
; Use this option with caution.

; 默认是禁止用明码在 URL 中显示 sid(session_id)的。
; 因为它会给你的用户带来安全危险。
; 需要慎重使用这个指令。

; - User may send URL contains active session ID
; to other person via. email/irc/etc.
; 用户可能将包含有效 sid 的 URL 通过 email/irc 等路径
; 告诉给其他人。

; - URL that contains active session ID may be stored
; in publically accessible computer.
; 包含有效 sid 的 URL 可能会被保存在公共电脑上。

; - User may access your site with the same session ID
; always using URL stored in browser's history or bookmarks.
; 用户可能保存带有固定不变 sid 的 URL 在他们的收藏夹或者
; 浏览历史记录里面。

session.use_trans_sid = 0

; Select a hash function
; 0: MD5 (128 bits)
; 1: SHA-1 (160 bits)

; 生成 sessions_id 的 hash 函数
; 0: MD5 (128 位)
; 1: SHA-1 (160 位)

session.hash_function = 0

; Define how many bits are stored in each character when converting
; the binary hash data to something readable.
;
; 指定在 sessions_id 字符串中的每个字符串内保存多少位二进制数。
; 这些二进制数是 hash 函数的运算结果。

; 4 bits: 0-9, a-f
; 5 bits: 0-9, a-v
; 6 bits: 0-9, a-z, A-Z, "-", ","

session.hash_bits_per_character = 5

; The URL rewriter will look for URLs in a defined set of HTML tags.
; form/fieldset are special; if you include them here, the rewriter will
; add a hidden <input> field with the info which is otherwise appended
; to URLs. If you want XHTML conformity, remove the form entry.
; Note that all valid entries require a "=", even if no value follows.

; 指定重写哪些 HTML 标签来包含 sid(session_id)。
; (仅在 "session.use_trans_sid" 打开的情况下有效)
; form 和 fieldset 比较特殊:
; ①如果你包含他们,URL 重写器将添加一个隐藏属性的 <input> 标签。它包含了
; 本应当额外追加到 URL 上的信息。
; ②如果你想兼容 XHTML 标准,请使用 "fieldset" 代替 "form"。
; 注意:所有合法的项都需要一个等号——即使后面没有值。

url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"


[MSSQL]

; Allow or prevent persistent links.
; 允许或禁止持久连接
mssql.allow_persistent = On

; Maximum number of persistent links. -1 means no limit.
; 持久连接的最大数。-1 表示无限制
mssql.max_persistent = -1

; Maximum number of links (persistent+non persistent). -1 means no limit.
; 连接的最大数目(持久和非持久)。-1 表示无限制
mssql.max_links = -1

; Minimum error severity to display.
; 显示的错误的最低严重性
mssql.min_error_severity = 10

; Minimum message severity to display.
; 显示的消息的最低重要性
mssql.min_message_severity = 10

; Compatibility mode with old versions of PHP 3.0.
; 与旧版的 PHP 3.0 兼容的模式。
mssql.compatability_mode = Off

; Connect timeout
; 连接超时(秒)
;mssql.connect_timeout = 5

; Query timeout
; 查询超时(秒)
;mssql.timeout = 60

; Valid range 0 - 2147483647. Default = 4096.
; 取值范围:0 - 2147483647。默认是 4096。
;mssql.textlimit = 4096

; Valid range 0 - 2147483647. Default = 4096.
; 取值范围:0 - 2147483647。默认是 4096。
;mssql.textsize = 4096

; Limits the number of records in each batch. 0 = all records in one batch.
; 每批记录最大条数(0 表示所有记录都在同一批当中)
;mssql.batchsize = 0

; Specify how datetime and datetim4 columns are returned
; On => Returns data converted to SQL Server settings
; Off => Returns values as YYYY-MM-DD hh:mm:ss

; 指定 datetime/datetim4 字段的返回方式。
; On => 按照 SQL Server 的设置返回
; Off => 按照 YYYY-MM-DD hh:mm:ss 格式返回

;mssql.datetimeconvert = On

; Use NT authentication when connecting to the server
; 连接到数据库时使用 NT 身份认证
mssql.secure_connection = Off

; Specify max number of processes. -1 = library default
; msdlib defaults to 25
; FreeTDS defaults to 4096

; 指定最大进程数。-1 表示链接库的默认值
; msdlib 默认为 25
; FreeTDS 默认为 4096
;mssql.max_procs = -1

; Specify client character set.
; If empty or not set the client charset from freetds.comf is used.
; This is only used when compiled with FreeTDS.
;mssql.charset = "ISO-8859-1"


[Assertion]

; Assert(expr); active by default.
; 是否启用 assert() 断点评估。断点(表达式),默认生效。
;assert.active = On

; Issue a PHP warning for each failed assertion.
; 是否对每个失败的短点发出警告。
;assert.warning = On

; Don't bail out by default.
; 默认不释放。
;assert.bail = Off

; User-function to be called if an assertion fails.
; 如果断点失败,就调用一个用户定义的回调函数。
;assert.callback = 0

; Eval the expression with current error_reporting().
; Set to true if you want error_reporting(0) around the eval().
; 是否使用安静评估(不显示任何错误信息,相当于error_reporting = 0)。
; 若关闭则在评估断点表达式的时候使用当前的 error_reporting 指令值。
;assert.quiet_eval = 0


[COM]

; path to a file containing GUIDs, IIDs or filenames of files with TypeLibs
; 包含 GUID 文件的路径,IID 或包含类型库的文件。
;com.typelib_file =

; allow Distributed-COM calls
; 允许分布式 COM 调用。
;com.allow_dcom = true

; autoregister constants of a components typlib on com_load()
; com_load() 函数自动注册类型库组件常数。
;com.autoregister_typelib = true

; register constants casesensitive
; 自动注册类型库组件常数是大小写敏感。
;com.autoregister_casesensitive = false

; show warnings on duplicate constant registrations
; 对重复注册的常量显示警告。
;com.autoregister_verbose = true


[mbstring]

; language for internal character representation.
; 用于内部字符表示的语言
;mbstring.language = Japanese

; internal/script encoding.
; Some encoding cannot work as internal encoding.
; (e.g. SJIS, BIG5, ISO-2022-*)

; internal/script 编码。
; 注意:有些编码不能用于此(如:SJIS、BIG5、ISO-2022-*)
;mbstring.internal_encoding = EUC-JP

; http input encoding.
; http 输入编码
;mbstring.http_input = auto

; http output encoding.
; mb_output_handler must be registered as output buffer to function
; http 输出编码。必须将 output_handler 设置为 "mb_output_handler" 函数才可以。
;mbstring.http_output = SJIS

; enable automatic encoding translation according to
; mbstring.internal_encoding setting. Input chars are
; converted to internal encoding by setting this to On.
; Note: Do _not_ use automatic encoding translation for
; portable libs/applications.

; 允许依照 mbstring.internal_encoding 设置进行自动编码转换。
; 打开这个特性会让输入的字符会转化为内部编码。
; 注意:千万不要将自动编码转换使用于可移植的库或者程序。

;mbstring.encoding_translation = Off

; automatic encoding detection order.
; auto means
; 编码自动检测指令
;mbstring.detect_order = auto

; substitute_character used when character cannot be converted
; one from another
; 当一种字符不能被转换为另一种字符的时候,这里的值就是替代字符。
;mbstring.substitute_character = none;

; overload(replace) single byte functions by mbstring functions.
; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
; etc. Possible values are 0,1,2,4 or combination of them.
; For example, 7 for overload everything.

; 0: No overload
; 1: Overload mail() function
; 2: Overload str*() functions
; 4: Overload ereg*() functions

; 用多字节字符串函数替换单字节字符串函数。
; mail()、ereg()... 将被替换为 mb_send_mail()、mb_ereg()...
; 可用0、1、2、4来组合。比如 7 表示替换所有。

; 0: 无替换
; 1: 替换 mail() 函数
; 2: 替换 str*() 函数
; 4: 替换 ereg*() 函数
;mbstring.func_overload = 0

; enable strict encoding detection.
;mbstring.strict_detection = Off


[FrontBase]
;fbsql.allow_persistent = On
;fbsql.autocommit = On
;fbsql.show_timestamp_decimals = Off
;fbsql.default_database =
;fbsql.default_database_password =
;fbsql.default_host =
;fbsql.default_password =
;fbsql.default_user = "_SYSTEM"
;fbsql.generate_warnings = Off
;fbsql.max_connections = 128
;fbsql.max_links = 128
;fbsql.max_persistent = -1
;fbsql.max_results = 128


[gd]
; Tell the jpeg decode to libjpeg warnings and try to create
; a gd image. The warning will then be displayed as notices
; disabled by default
; 是否忽略 jpeg 解码器的警告信息(比如无法识别图片格式)。
; 这个警告默认显示为通知格式。
;gd.jpeg_ignore_warning = 0


[exif]
; Exif UNICODE user comments are handled as UCS-2BE/UCS-2LE and JIS as JIS.
; With mbstring support this will automatically be converted into the encoding
; given by corresponding encode setting. When empty mbstring.internal_encoding
; is used. For the decode settings you can distinguish between motorola and
; intel byte order. A decode setting cannot be empty.

; Exif UNICODE 用户注释将被处理为 UCS-2BE/UCS-2LE,JIS 保持不变。
; 在多字节字符串的支持下 this 将被自动转化为设定的编码。
; 若将 mbstring.internal_encoding 设为空,根据解码设置,
; 就可以区别 motorola 和 intel 的字节指令(解码设置不能为空)

;exif.encode_unicode = ISO-8859-15
;exif.decode_unicode_motorola = UCS-2BE
;exif.decode_unicode_intel = UCS-2LE
;exif.encode_jis =
;exif.decode_jis_motorola = JIS
;exif.decode_jis_intel = JIS


[Tidy]
; The path to a default tidy configuration file to use when using tidy
; 默认 tidy 配置文件路径。
;tidy.default_config = /usr/local/lib/php/default.tcfg

; Should tidy clean and repair output automatically?
; WARNING: Do not use this option if you are generating non-html content
; such as dynamic images

; 是否允许 tidy 自动清理和修正输出。
; 警告:如果脚本可能会输出非 html 文件(比如动态图片),请不要打开此特征。
tidy.clean_output = Off


[soap]
; Enables or disables WSDL caching feature.
; 打开或者关闭 WSDL 缓冲功能。
soap.wsdl_cache_enabled = 1

; Sets the directory name where SOAP extension will put cache files.
; SOAP 扩展存放 cache 文件的目录。
soap.wsdl_cache_dir = "/tmp"

; (time to live) Sets the number of second while cached file will be used
; instead of original one.
; cache 文件使用期限(秒)。过期后将使用新文件。
soap.wsdl_cache_ttl = 86400

; Local Variables:
; tab-width: 4
; End:

; 局部变量:
; tab 宽度:4
; 结束:

[PHP_GD2]
extension=php_gd2.dll
[PHP_MYSQL]
extension=php_mysql.dll
[PHP_ZIP]
extension=php_zip.dll

 

原文链接:https://www.cnblogs.com/sishenzaixian/p/12722704.html



所属网站分类: 技术文章 > 博客

作者:天上飘来一个字

链接:http://www.phpheidong.com/blog/article/3589/4e5ce3cdf90d977e178c/

来源:php黑洞网

任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任

19 0
收藏该文
已收藏

评论内容:(最多支持255个字符)