Home > Backend Development > PHP Tutorial > php.ini Chinese version configuration instructions under php-5.2 Page 1/3_PHP Tutorial

php.ini Chinese version configuration instructions under php-5.2 Page 1/3_PHP Tutorial

WBOY
Release: 2016-07-21 15:50:42
Original
952 people have browsed it

;;;;;;;;;;;;
;; Syntax ;;

; The syntax of this file is very simple. Whitespace characters and lines starting with semicolons are simply ignored.
; Section titles (eg: [php]) are also simply ignored, even though they may have some meaning in the future.

; The format of the setting directive is as follows:
; directive = value
; The directive name (directive) is case-sensitive! So "foo=bar" is different from "FOO=bar".
; Value can be:
; 1. A string delimited by quotation marks (such as: "foo")
; 2. A number (integer or floating point number, such as: 0, 1, 34, -1, 33.55)
; 3. A PHP constant (such as: E_ALL, M_PI)
; 4. An INI constant (On, Off, none)
; 5. An expression (such as : E_ALL & ~E_NOTICE)

; Expressions in the INI file only use: bitwise operators, logical NOT, parentheses:
; | bitwise or
; & bitwise and
; ~ Bit NOT
; ! Logical NOT

; The Boolean flag uses On to indicate on and Off to indicate off.

; An empty string can be represented by not writing anything after the equal sign, or using the none keyword:
; foo = ; Set foo to an empty string
; foo = none ; Set foo to the empty string
; foo = "none" ; Set foo to the string 'none'

; if you use dynamic expansion (PHP extension or Zend extension) in the directive value constants in
; then you can only use these constants after loading these dynamically expanded command lines.



;; httpd.conf ;;

; You can also override the value of php.ini in httpd.conf for more flexible configuration:
; php_value name value ; Set non-bool type instructions, set value to none to clear the previous setting
; php_flag name on|off ; Only used to set bool type instructions

; PHP constant (such as E_ALL) can only be used in php.ini, and the corresponding mask value must be used in httpd.conf.
; Directives with the "SYS" flag can only be used in the global configuration section of httpd.conf.

;[Updated on 2007-4-9, added more information about PHP6, and corrected and added some information according to PHP-5.2.2]
;======= ======================================
;;======= ===Detailed explanation of configuration instructions============================
;============== ================================
; The setting values ​​of each command below are consistent with PHP-5.2. 2 The built-in defaults are the same.
; That is, if 'php.ini' does not exist, or you delete some lines, the default value will be the same.

;;;;;;;;;;;;;;
;; Apache ;;

[Apache]
; Only when using PHP as an Apache module efficient.

child_terminate = Off
; Whether the PHP script is allowed to use the apache_child_terminate() function to terminate the child process after the request ends.
; This directive is only available when PHP is installed as a module of Apache1.3 on UNIX platforms. It does not exist in any other case.

engine = On
; Whether to enable the PHP parsing engine.
; Tip: You can turn on or off the PHP parsing engine based on the directory or virtual host in httpd.conf.

last_modified = Off
; Whether to place the last modification time of the PHP script in the Last-Modified response header.

xbithack = Off
; Whether to parse as a PHP executable byte group regardless of the end of the file.



;; PHP Core;;


[PHP-Core-DateTime]
; The first four configuration options are currently only used for date_sunrise() and date_sunset() function.

date.default_latitude = 31.7667
; Default latitude

date.default_longitude = 35.2333
; Default longitude

date.sunrise_zenith = 90.583333
; Default Sunrise zenith

date.sunset_zenith = 90.583333
; Default sunset zenith

date.timezone =
; Used for all dates and times when the TZ environment variable is not set The function's default time zone.
; Mainland China should use "PRC"
; The priority order of application time zones is:
; 1. The time zone set with the date_default_timezone_set() function (if set)
; 2. TZ environment variable (if not empty)
; 3. The value of the instruction (if set)
; 4. PHP's own guess (if the operating system supports it)
; 5. If all of the above If unsuccessful, use UTC


[PHP-Core-Assert]

assert.active = On
; Whether to enable assert() assertion evaluation

assert.bail = Off
; Whether to abort the execution of the script when a failed assertion occurs

assert.callback =
; The callback function executed when a failed assertion occurs

assert.quiet_eval = Off
; Whether to use quiet evaluation (do not display any error information, equivalent to error_reporting=0).
; If turned off, the current error_reporting directive value is used when evaluating assertion expressions.

assert.warning = On
; Whether to issue a warning for each failed assertion


[PHP-Core-SafeMode]
; Safe mode is to solve the problem of sharing Established for server security issues.
; But trying to solve this problem at the PHP layer is structurally unreasonable.
; The correct approach should be to modify the web server layer and operating system layer.
; Therefore, the safe mode is abolished in PHP6 and security protection based on open_basedir is used.
; This part of the instructions has been completely deleted in PHP6.

safe_mode = Off
;SYS
; Whether to enable safe mode.
; When opened, PHP will check whether the owner of the current script is the same as the owner of the file being operated.
; If they are the same, the operation is allowed, if they are different, the operation is denied.

safe_mode_gid = Off
;SYS
; In safe mode, a UID comparison check is performed by default when accessing files.
; But in some cases strict UID checking is not suitable, and loose GID checking is enough.
; If you want to relax it to only do GID comparison, you can turn this parameter on.

safe_mode_allowed_env_vars = "PHP_"
;SYS
; A comma-separated list of prefixes for environment variables that users can only change in safe mode.
; Allows users to set certain environment variables, which may lead to potential security vulnerabilities.
; Note: If this parameter value is empty, PHP will allow users to change any environment variables!

safe_mode_protected_env_vars = "LD_LIBRARY_PATH"
;SYS
; List of environment variables (comma separated) that users cannot change in safe mode.
; These variables are protected even when the safe_mode_allowed_env_vars directive is set to allowed.

safe_mode_exec_dir = "/usr/local/php/bin"
;SYS
; In safe mode, only executable programs in this directory are allowed to be executed by functions that execute system programs.
; These functions are: system, escapeshellarg, escapeshellcmd, exec, passthru,
; proc_close, proc_get_status, proc_nice, proc_open, proc_terminate, shell_exec

safe_mode_include_dir =
;SYS
; In safe mode, UID/GID checking will be skipped when files in this group directory and its subdirectories are included.
; In other words, if the value here is empty, any file whose UID/GID does not match is not allowed to be included.
; The directory set here must already exist in the include_path directive or be included with a full path.
; Use colons (semicolons under Win) to separate multiple directories.
; The specified restriction is actually a prefix, not a directory name,
; that is, "/dir/incl" will allow access to "/dir/include" and "/dir/incls"
; If you wish to restrict access to a specific directory, add a trailing slash.


[PHP-Core-Safe]

allow_url_fopen = On
;SYS
; Whether to allow remote files to be opened

allow_url_include = Off
;SYS
; Whether to allow include/require remote files.

disable_classes =
;SYS
; This directive accepts a comma separated list of class names to disable specific classes.

disable_functions =
;SYS
; This directive accepts a comma-separated list of function names to disable specific functions.

enable_dl = On
;SYS
; Whether to allow the use of the dl() function. The dl() function only works when PHP is installed as an apache module.
; Disabling the dl() function is mainly for security reasons, because it can bypass the restrictions of the open_basedir directive.
; Always disable the dl() function in safe mode, regardless of how it is set here.
; This directive has been deleted in PHP6, which is equivalent to setting it to Off.

expose_php = On
;SYS
; Whether to expose the fact that PHP is installed on the server (add its signature in the http header).
; It poses no direct security threat, but it lets the client know that PHP is installed on the server.

open_basedir =
;SYS
; Limit all files (including the file itself) that PHP is allowed to operate to this group of directory lists.
; When a script attempts to open a file outside the specified directory tree, it will be rejected.
; All symbolic links are resolved, so it is not possible to circumvent this restriction through symbolic links.
; The special value '.' specifies that the directory where the script is stored will be used as the base directory.
; But this is somewhat dangerous, because the script's working directory can be easily changed by chdir().
; For shared servers, it will be very useful to flexibly set this directive in httpd.conf.
; Use semicolons to separate directories on Windows and colons on UNIX systems.
; When used as an Apache module, the open_basedir path in the parent directory will be automatically inherited.
; The specified restriction is actually a prefix, not a directory name,
; In other words, "/dir/incl" will allow access to "/dir/include" and "/dir/incls",
; If you wish to control access to a specific directory, add a trailing slash.
; The default is to allow all files to be opened.

sql.safe_mode = Off
;SYS
; Whether to use SQL safe mode.
; If on, database connection functions that specify default values ​​will use these default values ​​instead of supported parameters.
; For the connection function of each different database, please refer to the corresponding manual page for its default value.


[PHP-Core-Error]

error_reporting = E_ALL & ~E_NOTICE
; The error reporting level is the superposition of bit fields, it is recommended to use E_ALL | E_STRICT
; 1 E_ERROR Fatal runtime error
; 2 E_WARNING Runtime warning (non-fatal error)
; 4 E_PARSE Compile time parsing error
; 8 E_NOTICE Runtime reminder (often a bug, it may be intentional )
; 16 E_CORE_ERROR Fatal error during PHP startup initialization
; 32 E_CORE_WARNING Warning (non-fatal error) during PHP startup initialization
; 64 E_COMPILE_ERROR Fatal error during compilation
; 128 E_COMPILE_WARNING compile-time warning (non-fatal error)
; 256 E_USER_ERROR user-defined fatal error
; 512 E_USER_WARNING user-defined warning (non-fatal error)
; 1024 E_USER_NOTICE user-defined Definition reminder (often a bug, may also be intentional)
; 2048 E_STRICT Coding standardization warning (recommend how to modify for forward compatibility)
; 4096 E_RECOVERABLE_ERROR Near-fatal runtime error, if not caught Treated as E_ERROR
; 6143 E_ALL All errors except E_STRICT (8191 in PHP6, including all)

track_errors = Off
; Whether to save the latest error or warning in the variable $php_errormsg information.

display_errors = On
; Whether to display error messages as part of the output.
; On the final published web site, it is strongly recommended that you turn off this feature and use error logging instead (see below).
; Turning this feature on in the final published web site may expose some security information,
; such as file paths, database plans, or other information on your web service.

display_startup_errors = Off
; Whether to display PHP startup errors.
; Even if the display_errors directive is turned on, turning this parameter off will not display errors when PHP starts.
; It is recommended that you turn off this feature unless you must use it for debugging.

report_memleaks = On
; Whether to report memory leaks. This parameter only works in PHP compiled in debug mode,
; and must include E_WARNING in the error_reporting directive

report_zend_debug = On
; No documentation yet

html_errors = On
; Whether to use HTML tags in error messages.
; Note: Do not use this feature on published sites!

docref_root = ;"http://localhost/phpmanual/"
docref_ext = ;".html"
; If the html_errors directive is turned on, PHP will display a hyperlink on the error message.
; Direct link to a page describing the error or the function that caused the error.
; You can download the php manual from http://www.php.net/docs.php,
; and point the docref_root directive to the URL directory where your local manual is located.
; You must also set the docref_ext directive to specify the file extension (must contain '.').
; NOTE: Do not use this feature on published sites.

error_prepend_string = ;""
; String used to output before error message
error_append_string = ;"
"
; Used String output after the error message

xmlrpc_errors = Off
;SYS
xmlrpc_error_number = 0
; No documentation yet


[PHP-Core-Logging ]

define_syslog_variables = Off
; Whether to define various system log variables, such as: $LOG_PID, $LOG_CRON, etc.
; Good idea to turn it off to be more efficient.
; You can call define_syslog_variables() function to define these variables at runtime.

error_log =
; Which file to record the error log to. The file must be writable by the web server user.
; syslog means logging to the system log (event log under NT, syslog(3) under Unix)
; If no value is set here, the error will be logged to the error log of the web server .

log_errors = Off
; Whether to record errors in the log file and where to record them depends on the error_log directive.
; It is strongly recommended that you use logging errors instead of direct output when you finally publish the web site.
; This will let you know what went wrong without exposing sensitive information.

log_errors_max_len = 1024
; Set the maximum length of the error source associated with the error message attached to the error log.
; The value set here is valid for displayed and logged errors as well as $php_errormsg.
; Set to 0 to allow unlimited length.

ignore_repeated_errors = Off
; Whether to ignore repeated error messages when recording error logs.
; Error messages must appear on the same line in the same file to be considered duplicates.

ignore_repeated_source = Off
; Whether to ignore repeated error sources when ignoring repeated error messages.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/319303.htmlTechArticle;;;;;;;;;;;;;; Syntax;; ; The syntax of this file is very simple . Whitespace characters and lines starting with semicolons are simply ignored. ; Chapter titles (eg: [php]) are also simply ignored, even if in the future...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template