php-5.2 php.ini Chinese version of the configuration instructions 1th/3 page _php Basics

Source: Internet
Author: User
Tags assert bitwise operators html tags parent directory parse error php script syslog system log
;;;;;;;;;;;;
;; grammar;;

; The syntax for this file is very simple. White-space characters and lines starting with semicolons are simply ignored.
; Chapter headings (for example, [PHP]) are also simply ignored, even though they may be of some significance in the future.

; The format of the directive is as follows:
; directive = value
; The instruction name (directive) is case-sensitive! So "Foo=bar" is different from "Foo=bar".
; Values (value) can be:
; 1. Strings (e.g. "foo") defined in quotation marks
; 2. A number (integer or floating-point numbers, 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 (e.g.: E_all & ~e_notice)

; INI file only uses: Bitwise operators, logical non, parentheses:
; | Bit or
; & Position and
; ~ Bit non
; ! Logical non

; The Boolean flag is opened with on, and off is closed.

; An empty string can be represented by an equal sign without writing anything, or with the None keyword:
; Foo =; Set Foo to an empty string
; foo = none; Set Foo to an empty string
; Foo = "None"; Set Foo to string ' None '

; If you use constants in a dynamic extension (PHP extension or Zend Extension) in the instruction value,
; Then you can use these constants only after loading these dynamically extended command lines.



;; httpd.conf;;

; You can also override php.ini values in httpd.conf for more flexible configuration:
; Php_value name value; set a non-BOOL directive and set value to none to clear previous settings
; Php_flag name On|off; only instructions for setting the bool type

; PHP constants (such as E_all) can only be used in php.ini, and the corresponding mask values must be used in httpd.conf.
; Directives with the "SYS" flag can only be used in the global configuration portion of httpd.conf.

; [2007-4-9 Daily Update, added more information about PHP6, and revised and added some information according to PHP-5.2.2]
;=============================================
;; ========== Configuration Instructions Detailed ===========================
;=============================================
; The settings for each of the following instructions are the same as the default values built in PHP-5.2.2.
; In other words, if ' php.ini ' does not exist, or if you delete some rows, the default value is the same.

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

[Apache]
; Valid only when PHP is used as the Apache module.

Child_terminate = Off
; Whether the PHP script allows the apache_child_terminate () function to terminate the child process after the request is completed.
; This directive is available only when installing PHP as a Apache1.3 module on the UNIX platform. No other case exists.

Engine = On
; Whether to enable the PHP resolution engine.
; Tip: You can open or close the PHP parsing engine in httpd.conf based on a directory or a virtual host.

Last_modified = Off
; Whether to place the last modification time of the PHP script in the last-modified answer header.

Xbithack = Off
; Whether or not whatever the end of the file is, resolves it as a php executable bit group.



;; PHP core;;


[Php-core-datetime]
; The first four configuration options are currently available only for the date_sunrise () and Date_sunset () functions.

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 =
; The default time zone for all date and time functions when the TZ environment variable is not set.
; Chinese mainland should use "PRC"
; The order of precedence for applying time zones is:
; 1. Time zone set by the Date_default_timezone_set () function (if set)
; 2. TZ environment variable (if not empty)
; 3. The value of the directive (if set)
; 4. PHP own speculation (if the operating system supports)
; 5. If none of the above is successful, use UTC


[Php-core-assert]

Assert.active = On
; Whether assert () assertion evaluation is enabled

Assert.bail = Off
; Whether to abort script execution when a failure assertion occurs

Assert.callback =
; callback function executed when a failure assertion occurs

Assert.quiet_eval = Off
; Whether to use a quiet evaluation (no error message is displayed, equivalent to error_reporting=0).
; If closed, the current error_reporting directive value is used when evaluating an assertion expression.

Assert.warning = On
; Whether a warning is issued for each failure assertion


[Php-core-safemode]
; Security mode is set up to address the security issues of shared servers.
; But trying to solve the problem in the PHP layer is structurally unreasonable,
; The correct approach should be to modify the Web server layer and the operating system layer.
; As a result, security mode is abolished in PHP6, and security protection based on Open_basedir is used.
; This part of the instruction has been completely deleted in the PHP6.

Safe_mode = Off
; SYS
; Whether Safe mode is enabled.
; When opened, PHP checks to see if the owner of the current script is the same as the owner of the file being manipulated.
; The same action is allowed, but the action is rejected.

Safe_mode_gid = Off
; SYS
; In Safe mode, the default is to make a UID comparison check when accessing files.
; In some cases, however, strict UID checks are not appropriate, and a loose GID check is sufficient.
; You can open this parameter if you want to relax it to just do a gid comparison.

Safe_mode_allowed_env_vars = "Php_"
; SYS
; In safe mode, the user can only change the prefix list of environment variables (comma-delimited).
; Allowing users to set certain environment variables can cause potential security vulnerabilities.
; Note: If this parameter value is NULL, PHP will allow the user to change any environment variable!

Safe_mode_protected_env_vars = "Ld_library_path"
; SYS
; In safe mode, the list of environment variables that the user cannot change (comma-delimited).
; These variables are protected even if the safe_mode_allowed_env_vars instruction is set to allow.

Safe_mode_exec_dir = "/usr/local/php/bin"
; SYS
; In safe mode, only the executable program under that directory allows the execution of functions performed by the system program.
; 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, the Uid/gid check is skipped when the group directory and the files under its subdirectories are included.
; In other words, if the value here is null, no uid/gid files are allowed to be included.
; The directory set here must already exist in the Include_path directive or be included with the full path.
; Multiple directories are separated by a colon (a semicolon under win).
; The specified limit is actually a prefix, not a directory name.
; That is to say, "/DIR/INCL" will allow access to "/dir/include" and "/dir/incls"
; If you want to control access in a specified directory, add a slash at the end.


[Php-core-safe]

Allow_url_fopen = On
; SYS
; Whether to allow remote files to open

Allow_url_include = Off
; SYS
; Whether to allow Include/require remote files.

Disable_classes =
; SYS
; The directive accepts a comma-delimited list of class names to disable a particular class.

Disable_functions =
; SYS
; The directive accepts a comma-delimited list of function names to disable specific functions.

ENABLE_DL = On
; SYS
; Whether the DL () function is allowed. The DL () function is only available when installing PHP as an Apache module.
; Disabling the DL () function is primarily for security reasons because it bypasses the limitations of the OPEN_BASEDIR directive.
; The DL () function is always disabled in safe mode, regardless of how it is set here.
; The directive is removed in PHP6, which is equivalent to off.

expose_php = On
; SYS
; Exposes the fact that PHP is installed on the server (plus its signature in the HTTP header).
; It does not have a direct security threat, but it makes the client aware that PHP is installed on the server.

Open_basedir =
; SYS
; Restrict all files (including the file itself) that PHP allows to operate under this Group directory list.
; When a script attempts to open a file outside of a specified directory tree, it is rejected.
; All symbolic connections are parsed, so it is not possible to circumvent this limitation through symbolic connections.
; Special value '. ' Specifies that the directory where the script is stored will be treated as a base directory.
; But this is a bit risky because the script's working directory can easily be changed by ChDir ().
; For shared servers, it becomes very useful to set this directive flexibly in httpd.conf.
; Separate directories in Windows with semicolons, separated by colons in Unix systems.
; As an Apache module, the Open_basedir path in the parent directory is automatically inherited.
; The specified limit is actually a prefix, not a directory name.
; That is to say, "/DIR/INCL" will allow access to "/dir/include" and "/dir/incls",
; If you want to control access in a specified directory, add a slash at the end.
; By default, all files are allowed to open.

Sql.safe_mode = Off
; SYS
; Whether to use SQL security mode.
; If turned on, the database connection functions that specify default values will use these defaults instead of the supported parameters.
; For each different database connection function, its default values refer to the appropriate manual page.


[Php-core-error]

error_reporting = E_all & ~e_notice
; The error reporting level is a bit-field overlay, recommended for use with E_all | E_strict
; 1 E_error Fatal Run-time Error
; 2 e_warning Runtime Warning (non-fatal error)
; 4 E_parse Compile-time parse error
; 8 E_notice Runtime Reminders (often bugs or intentional)
; E_core_error fatal error during initialization during PHP startup
; E_core_warning warning during initialization of PHP (non-fatal error)
; E_compile_error compile-time fatal error
; 128 E_compile_warning Compile-time warning (non-fatal error)
; 256 e_user_error user-defined fatal error
; E_user_warning user-defined warning (non-fatal error)
; 1024 E_user_notice user-defined reminders (often bugs, possibly intentional)
; 2048 E_strict Coding Standardization Warning (recommended how to modify to forward compatible)
; 4096 E_recoverable_error is close to fatal run-time error and is treated as if not captured E_error
; 6143 e_all All errors except E_strict (8191 in PHP6, including all)

Track_errors = Off
; Whether to save the most recent error or warning message in the variable $php_errormsg.

Display_errors = On
; Whether to display the error message as part of the output.
; In the final release of the Web site, it is strongly recommended that you turn off this feature and use the error log instead (see below).
; Opening this feature on the final published Web site may expose some security information,
; For example, a file path on your Web service, a database plan, or other information.

Display_startup_errors = Off
; Whether to show PHP startup errors.
; Even if the display_errors instruction is turned on, turning off this parameter will not show PHP startup errors.
; It is recommended that you turn off this feature unless you have to use it for debugging.

Report_memleaks = On
; Whether to report a memory leak. This parameter only works in PHP, which is compiled in debug mode.
; and must include e_warning in the error_reporting directive

Report_zend_debug = On
; No documented documentation yet

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

Docref_root =; " http://localhost/phpmanual/"
Docref_ext =; ". html
; If the html_errors command is turned on, PHP will display a hyperlink on the error message.
; Link directly to a page that describes 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 instructions to the URL directory of your local manual.
; You must also set the DOCREF_EXT directive to specify the file extension (must contain '. ').
; Note: Do not use this feature on the published site.

Error_prepend_string =; " <font color= #f00 > "
; The string to output before the error message
Error_append_string =; " </font> "
; String to output after error message

Xmlrpc_errors = Off
; SYS
Xmlrpc_error_number = 0
; No document yet


[Php-core-logging]

Define_syslog_variables = Off
; Whether to define a variety of system log variables, such as: $LOG _pid, $LOG _cron, and so on.
; A good idea to turn it off to improve efficiency.
; You can call the Define_syslog_variables () function at run time to define these variables.

Error_log =
; The file to which the error log is logged. The file must be writable by the Web server user.
; Syslog representation is logged to the System log (event log under NT, UNIX syslog (3))
; If no value is set here, the error is logged to the Web server's error log.

Log_errors = Off
; Whether the error is logged in the log file, and where it is recorded depends on the error_log directive.
; It is highly recommended that you use logging errors instead of direct output at the end of your published Web site.
; This allows you both to know that there is a problem and not to expose sensitive information.

Log_errors_max_len = 1024
; Sets the maximum length of the error source associated with the error message that is attached to the error log.
; The values set here are valid for both the displayed and recorded errors as well as the $php_errormsg.
; Set to 0 to allow unlimited lengths.

Ignore_repeated_errors = Off
; Whether to ignore duplicate error messages when logging the error log.
; The error message must appear on the same line in the same file to be treated as duplicates.

Ignore_repeated_source = Off
; Whether duplicate error sources are ignored when repeating error messages are ignored.

Current 1/3 page 123 Next read the full text

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.