For php-5.2 php. ini Chinese version (2); [UPDATES]; configuration instructions for php-5.2 php. ini Chinese version (2)
; [Updated on December 3,]
; ========================================================== ==================================
;; ==================================== Configuration instructions ========== ======================================
; ========================================================== ==================================
; The setting value for each of the following commands is the same as the default value built into the PHP-5.2.5.
That is, if 'php. ini 'does not exist, or you have deleted some rows, the default value is the same.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
Apache;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[Apache]
;
Valid only when PHP is used as the Apache Module.
Child_terminate= Off
; PHP scripts allow the use of the apache_child_terminate () function to stop child processes after the request ends.
This command is only available when PHP is installed as Apache1.3 on UNIX platforms. It does not exist in other cases.
Engine= On
Whether to enable the PHP parsing engine.
Tip: You can enable or disable the PHP parsing engine in httpd. conf based on directories or virtual hosts.
Last_modified= Off
Whether to place the Last modification time of the PHP script in the Last-Modified response header.
Xbithack= Off
Whether or not the end of the file is parsed as a PHP executable bit group.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
PHP core;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
[PHP-Core-DateTime]
The first four configuration options are currently only used for date_sunrise () and date_sunset () functions.
Date. default_latitude= 31.7667
; Default latitude
Date. default_longpolling= 35.2333
; Default longitude
Date. sunrise_zenith= 90.583333
By default
Date. sunset_zenith= 90.583333
By default, the sunset is at the top of the day.
Date. timezone=
; The default time zone used for all date and time functions when TZ environment variables are not set.
; "PRC" should be used in mainland China"
The priority of the application time zone is:
; 1. use
Date_default_timezone_set() Time zone set by the function (if so)
; 2. TZ environment variable (if not empty)
; 3. the value of this command (if set)
4. PHP speculation (if supported by the operating system)
; 5. if none of the above is successful, use "UTC"
[PHP-Core-Assert]
Assert. active= On
; Whether to enable assert () assert evaluation
Assert. bail= Off
; Whether to abort script execution in the event of a failure assertion
Assert. callback=
; The callback function executed when an assertion fails.
Assert. quiet_eval= Off
; Whether to use quiet evaluation (no error message is displayed, which is equivalent to error_reporting = 0 ).
If it is disabled, the current error_reporting command value is used to evaluate the asserted expression.
Assert. warning= On
; Whether to give a warning to each failure assertion
[PHP-Core-SafeMode]
The security mode is set up to solve the security problem of the shared server.
But it is unreasonable in structure to try to solve this problem at the PHP layer,
The correct method should be to modify the web server layer and operating system layer.
Therefore, in PHP6, the security mode is removed and open_basedir-based security protection is used.
;
All commands in PHP6 have been deleted..
Safe_mode= Off
Whether to enable the security mode.
When the script is enabled, PHP checks whether the owner of the current script is the same as the owner of the operated file,
If they are the same, the operation is allowed. Otherwise, the operation is denied.
Safe_mode_gid= Off
In safe mode, the UID comparison check is performed by default during file access.
But in some cases, strict UID check is not suitable, and the loose GID check is enough.
If you want to extend it to GID-only comparison, you can open this parameter.
Safe_mode_allowed_env_vars= "PHP _"
In security mode, you can only change the Prefix List of environment variables (separated by commas ).
; Allows you to set certain environment variables, which may lead to potential security vulnerabilities.
;
Note: If this parameter is null, PHP allows you to change any environment variable.!
Safe_mode_protected_env_vars= "LD_LIBRARY_PATH"
In security mode, you cannot change the list of environment variables (separated by commas ).
; These variables are
Safe_mode_allowed_env_varsIf the command is set to allow, it will also be protected.
Safe_mode_exec_dir= "/Usr/local/php/bin"
In security mode, only executable programs in this directory can be executed by functions of the execution 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=
In security mode, the UID/GID check will be skipped when the group Directory and files in its subdirectories are included.
In other words, if the value here is null, any file with a UID/GID that does not match is not allowed to be included.
The directory set here must already exist in the include_path command or be included in the full path.
Multiple directories are separated by colons (semicolons in Win.
; The specified restriction is actually a prefix instead of a directory name,
That is, "/dir/incl" will allow access to "/dir/include" and "/dir/incls"
If you want to control access to a specified directory, add a slash at the end.
[PHP-Core-Safe]
Allow_url_fopen= On
; Whether to allow remote file opening
Allow_url_include= Off
; Whether to allow include/require remote files.
Disable_classes=
This command accepts a list of class names separated by commas to disable specific classes.
Disable_functions=
This command accepts a list of function names separated by commas (,) to disable specific functions.
Enable_dl= On
Whether to use the dl () function. The dl () function is only valid when PHP is installed as an apache module.
The dl () function is disabled mainly for security reasons because it can bypass the restrictions of the open_basedir command.
; Always disable the dl () function in safe mode, regardless of how it is set here.
The command is deleted in PHP6, which is set to Off.
Expose_php= On
Whether to expose the fact that PHP is installed on the server (add the signature in the http header ).
It does not directly threaten security, but it makes the client know that PHP is installed on the server.
Open_basedir=
Restrict all files allowed by PHP (including files themselves) to the list of directories in this group.
When a script tries to open a file outside the specified directory tree, it will be rejected.
All symbolic connections are parsed, so it is impossible to avoid this restriction through symbolic connections.
The special value '.' specifies the directory where the script is stored as the reference directory,
But this is dangerous because the working directory of the script can be easily changed by chdir.
For shared servers, it is very useful to flexibly set this command for different virtual hosts or directories in httpd. conf.
In Windows, use semicolons to separate directories, and use colons to separate directories in UNIX.
As the Apache module, the open_basedir path in the parent directory is automatically inherited.
; The specified restriction is actually a prefix instead of a directory name,
That is to say, "/dir/incl" will allow access to "/dir/include" and "/dir/incls ",
If you want to control access to a specified directory, add a slash at the end.
By default, all files are allowed to be opened.
SQL. safe_mode= Off
Whether to use SQL security mode.
If enabled, database connection functions with default values will use these default values to replace the supported parameters.
For the connection functions of different databases, see the corresponding manual page for the default values.