[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 = "&"
; 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 = https://www.cnblogs.com/sishenzaixian/p/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="[email protected]"
; 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 = [email protected]
; 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.uj5u.com/houduan/55122.html
標籤:PHP
