PHP.INI Configuration Options Collection

xiaoxiao2021-03-06  20

HTTPD option

Table 4-2. Httpd option

Name Default value category async_send "0" php_ini_all

Language options

Table 4-3. Language and Miscellaneous Configuration Options

Name Default category short_open_tagOnPHP_INI_SYSTEM | PHP_INI_PERDIRasp_tagsOffPHP_INI_SYSTEM | PHP_INI_PERDIRprecision "14" PHP_INI_ALLy2k_complianceOffPHP_INI_ALLallow_call_time_pass_referenceOnPHP_INI_SYSTEM | PHP_INI_PERDIRexpose_phpOnPHP_INI_SYSTEM

The following is a brief explanation of this configuration option.

SHORT_OPEN_TAG

Boolean

Decide whether to allow the use of PHP code to start the abbreviation form (). If you want to use PHP with XML, you can disable this option to embed . Otherwise, you can also output by PHP, for example: . If disabled, you must use the PHP code to start the full form of the flag ().

Note: This directive will also affect the abbreviation form

ASP_TAGS

Boolean

Allows the use of ASP-style flags <%%> to be used in addition to the usual Logo. This also includes an abbreviation of the output variable value <% = $ value%>. For more information, see section section from HTML.

Note: The support of the ASP style logo is a 3.0.4 version of the new.

Precision

Integer

The number of bits of the valid number is displayed in the floating point number.

Y2K_Compliance

Boolean

Forced 2000 compatibility (there is a problem in incompatible browsers).

Allow_call_time_pass_reference

Boolean

Whether to enable the enforcement parameters when the function call is passed in accordance with the reference. This method is no longer supported in favor of PHP / Zend's future versions. The method of encouragement is to specify which parameters specified in the function definition should be delivered with reference. Encourage everyone to try to close this option and make sure the script can run normally to ensure that the script can also run in the future version (each time you use this feature), the parameter is passed by value, not according to reference delivery).

See the explanation of references.

Expose_php

Boolean

Decides whether exposed PHP is installed on the server (such as adding its signature in the information header of the web server). There is no security threat, just let the client know if the PHP is installed in the server.

Resource limit

Table 4-4. Resource Limit

Name Default Type Memory_Limit "8M" PHP_INI_ALL

The following is a brief explanation of this configuration option.

Memory_limit

Integer

This directive sets the maximum number of memory by one that can be applied for a script. This helps prevent the available memory on the light server that is not written. To use this instruction, you must activate when compiling. Therefore, Configure should include: - enable-memory-limited. If there is no need for any memory, it must be set to -1.

Since 4.3.2, when MEMORY_LIMIT is activated, the PHP function Memory_Get_USAGE () is available.

See Max_Execution_time.

data processing

Table 4-5. Data Processing Configuration Options

Name Default type track-vars "On" PHP_INI _ ?? arg_separator.output "&" PHP_INI_ALLarg_separator.input "&" PHP_INI_SYSTEM | PHP_INI_PERDIRvariables_order "EGPCS" PHP_INI_ALLregister_globals "Off" PHP_INI_PERDIR | PHP_INI_SYSTEMregister_argc_argv "On" PHP_INI_PERDIR | PHP_INI_SYSTEMregister_long_arrays "On" PHP_INI_PERDIR | PHP_INI_SYSTEMpost_max_size "8M" PHP_INI_SYSTEM | PHP_INI_PERDIRgpc_order "GPC" PHP_INI_ALLauto_prepend_file "" PHP_INI_SYSTEM | PHP_INI_PERDIRauto_append_file "" PHP_INI_SYSTEM | PHP_INI_PERDIRdefault_mimetype "text / html" PHP_INI_ALLdefault_charset "iso-8859-1" PHP_INI_ALLalways_populate_raw_post_data "0" PHP_INI_SYSTEM | PHP_INI_PERDIRallow_webdav_methods "0" PHP_INI_SYSTEM | PHP_INI_PERDIR this configuration is the following A brief explanation of the options.

TRACK_VARS

Boolean

If activated, environment variables, get, post, cookie and server variables can be found in global associated arrays: $ _ env, $ _ get, $ _ post, $ _ cookie and $ _server.

Be careful from PHP 4.0.3, Track_vars always open.

arg_separator.output

String

The separator of the parameter is separated in the URL generated by PHP.

Arg_separator.input

String

PHP is used to resolve the URL to the partition list of variables.

Note: Each character in this directive will be used as a separator!

Variables_order

String

Set the order of EGPCS (Environment, Get, POST, Cookie, Server) variable parsing. The default is set to "EGPCS". For example, set it to "GP", which causes PHP to completely ignore environment variables, cookies, and server variables, and override the same name variables for the POST method with variables of the GET method.

See register_globals.

Register_globals

Boolean

Decide whether eGPCS (Environment, Get, POST, COOKIE, Server) variables are registered as global variables. For example, if register_globals = ON, then url http://www.example.com/test.php?id=3 will generate $ ID. Or from $ _SERVER ['Document_Root'] to $ Document_Root. If you don't want user data to mess with the global domain, you can close this option. Since PHP 4.2.0, this directive defaults to OFF. It is recommended to use PHP's predefined variables to replace, such as super global variables: $ _ ENV, $ _ get, $ _ post, $ _ cookie and $ _server. Related information Please read the use of REGISTER_GLOBALS in a chapter. Note that register_globals cannot be set at runtime (INI_SET ()), although it is possible to use .htaccess when the host is allowed as described above. An example of a .htaccess project: PHP_FLAG Register_Globals ON.

Note: Register_global is affected by the Variables_ORDER directive.

Register_argc_argv

Boolean

Decide whether PHP defines the Argv & Argc variable (possibly containing Get information).

See the command line mode. In addition, this option is available from PHP 4.0.0, which is always "ON" before this.

Register_long_arrays

Boolean

Set whether PHP registers a predefined variable such as $ http _ * _ VARS. If ON (default), a PHP variable similar to $ http_get_vars will be registered. If you do not use it, you can consider this option for performance considers, and use the overall overall array case such as $ _get.

This directive is available from PHP 5.0.0.

POST_MAX_SIZE

Integer

Set the maximum size allowed by POST data. This setting also affects file upload. To upload a large file, this value must be greater than UPLOAD_MAX_FILESIZE.

If the memory limit is activated in the configuration script, Memory_Limit also affects the file upload. Usually, Memory_LIMIT should be larger than post_max_size.

GPC_ORDER

String

Set the order in which get / post / cookie variable parses is default "GPC". For example, set it to "GP", which causes PHP to completely ignore the cookie variable, and override the same name variables for the POST method with variables of the GET method.

Note: This option cannot be used for PHP 4. Use variables_order alternatives.

Auto_prepend_file

String

Specifies the file name that automatically parsed before the primary file. This file is as included in calling the include () function, therefore use of include_path.

Special value NONE prohibits automatic prefix.

Auto_APpend_file

String

Specifies the file name that automatically parsing after the primary file. This file is as included in calling the include () function, therefore use of include_path.

Special value NONE prohibits automatic suffix.

Note: If the script terminates via EXIT (), the auto suffix does not occur.

Default_Mimetype

String

Default_Charset

String

Since 4.0b4, PHP is always default output character encoding in the HTTP information header Content-Type: To disable the sending character set, set this option to an empty. ALWAYS_POPULATE_RAW_POST_DATA

Boolean

Always add $ http_raw_post_data variable.

Allow_webdav_methods

Boolean

Allows HTTP requests for WebDAV (for example, PROPFIND, Proppatch, Move, Copy, etc.) in the PHP script. If you want to obtain the POST data of these requests, you also set always_populate_raw_post_data.

See Magic_QUOTES_GPC, Magic-Quotes-Runtime and Magic_quotes_sybase.

Path and directory

Table 4-6. Path and Directory Configuration Options

Name Default Type include_pathPHP_INCLUDE_PATHPHP_INI_ALLdoc_rootPHP_INCLUDE_PATHPHP_INI_SYSTEMuser_dirNULLPHP_INI_SYSTEMextension_dirPHP_EXTENSION_DIRPHP_INI_SYSTEMcgi.fix_pathinfo "0" PHP_INI_SYSTEMcgi.force_redirect "1" PHP_INI_SYSTEMcgi.redirect_status_env "" PHP_INI_SYSTEMfastcgi.impersonate "0" PHP_INI_SYSTEMcgi.rfc2616_headers "0" PHP_INI_SYSTEM

The following is a brief explanation of this configuration option.

INCLUDE_PATH

String

Specify a set of directories for the request (), include (), and fopen_with_path () functions to look for files. The PATH environment variable of format and system is similar: a list of sets of directories, separated by colon in UNIX, separated by semicolons in Windows.

Example 4-3. Unix Include_path

INCLUDE_PATH = ".: / php / incruDes"

Example 4-4. Windows Include_path

INCLUDE_PATH = ".; C: / PHP / Includes"

Use in the included path. It can allow relative paths to represent the current directory.

DOC_ROOT

String

The root directory of PHP on the server. Use only when it is not empty. If the PHP is configured to be safe mode, the file outside this directory is not parsed. If the PHP is compiled, does not specify force_redirect, and the PHP is run in any web server (except IIS), and DOC_ROOT should be set. The alternative is to use the following cgi.force_redirect configuration option.

User_dir

String

Use the basic directory name of the PHP file under the user directory, such as public_html.

EXTENSION_DIR

String

PHP is used to find a directory of dynamically connect expansion libraries. See Enable_DL and DL ().

Extension

String

Dynamic connection expansion library loaded when PHP starts.

CGI.FIX_PathInfo

Boolean

Provide true Path_info / path_translated support for CGI. Previous PHP behavior was set to Script_FileName, regardless of Path_Info. For more information on Path_Info, see the CGI specification. Set this value to 1 will cause the PHP CGI to correct its path to comply with the specification. Set to 0 will make PHP behavior and past. By default is zero. Users should correct their scripts to use Script_FileName instead of PATH_TRANSLATED. CGI.FORCE_REDIRECT

Boolean

It is necessary to provide security with cgi.force_redirect in most web servers. PHP defaults to ON. It can be turned off, but the risk is self-burden.

Note: Windows users: You can safely turn it down under IIS, in fact, you must do this. It is necessary to use it under Omnihttpd or Xitami to close it.

CGI.Redirect_Status_ENV

String

If you open the cgi.force_redirect, and not run under the Apache or Netscape (Iplanet) web server, you may need to set an environment variable name, and PHP will look for it to know that you can continue.

Note: Setting this variable can lead to security issues, first know what you are doing.

Fastcgi.impersonate

String

IIS (in WinNT-based operating system-based operating system) The ability to imitate the client security token. This allows IIS to define the security context of the request based on the runtime. This feature is not supported in the mod_fastcgi in Apache (03/17/2002). Set to 1 if run in IIS. Default is 0.

CGI.RFC2616_HEADERS

int

Specifies what headers that PHP use when sending an HTTP response code. If set to 0, PHP sends a Status: Head, Apache, and other web server support. If this option is set to 1, PHP will send RFC 2616-compatible headers. Unless you know what you are doing, otherwise keep its value of 0.

File Upload

Table 4-7. File Upload Configuration Options

Name Default Type File_uploads "1" PHP_INI_SYSTEMUPLOAD_TMP_DIRNULLPHP_INI_SYSTEMUPLOAD_MAX_FILESIZE "2M" PHP_INI_SYSTEM | PHP_INI_PERDIR

The following is a brief explanation of this configuration option.

FILE_UPLOADS

Boolean

Whether it allows HTTP files to be uploaded. See UPLOAD_MAX_FILESIZE, UPLOAD_TMP_DIR and POST_MAX_SIZE instructions.

UPLOAD_TMP_DIR

String

The temporary directory of the file is stored uploaded. Must be a directory that the PHP process owner user can write. If it is not specified, PHP uses the system default value.

UPLOAD_MAX_FILESIZE

Integer

The maximum size of the file uploaded.

Ordinary SQL

Table 4-8. Ordinary SQL Configuration Options

Name Default Type SQL.SAFE_MODE "0" PHP_INI_SYSTEM

The following is a brief explanation of this configuration option.

SQL.SAFE_MODE

Boolean

Debugger Configuration Options

Debugger.host

String

The DNS name or IP address of the host used by the debugger.

Debugger.port

String

The port number used in the debugger.

Debugger.enabled

Boolean

Whether the debugger is enabled.

转载请注明原文地址:https://www.9cbs.com/read-43311.html

New Post(0)