PHP.ini Core-equipped option description

Source: Internet
Author: User
Tags what header
PHP.ini Core configuration Options Description

The list contains only the core php.ini configuration options. Extended configuration options are described separately on each extended document page. The options for session can be found on the sessions page.

HTTPD Options
Table G-3. HTTPD Options

Name default to modify range update record
Async_send "0" Php_ini_all

Language Options
Table G-4. Language and miscellaneous configuration options

Name default to modify range update record
Short_open_tag "1" Php_ini_perdir is php_ini_all when PHP <= 4.0.0.
Asp_tags "0" Php_ini_perdir is php_ini_all when PHP <= 4.0.0.
Precision "Php_ini_all"
Y2k_compliance "1" php_ini_all
Allow_call_time_pass_reference "1" Php_ini_perdir is php_ini_all when PHP <= 4.0.0.
expose_php "1" can only be configured in php.ini.
Zend.ze1_compatibility_mode "0" Php_ini_all available from PHP 5.0.0.

The following is a brief explanation of the configuration options.

Short_open_tag Boolean
Determines whether to allow the use of the PHP code to start the abbreviation of the flag ( ). If you want to use PHP in conjunction with XML, you can disable this option for embedding purposes . Otherwise, it can be output via PHP, for example: . If disabled, you must use the full form of the PHP Code start flag ( ).

Note: This directive also affects the abbreviated form

Asp_tags Boolean
In addition to the usual flags, the ASP-style logo <%%> is allowed. This also includes an abbreviation for the output variable value <%= $value%>. For more information, see Detach a section from HTML.

Note: ASP Style logo support is 3.0.4 version of the new addition.

Precision Integer
The number of digits in the floating-point number that displays the valid digits.

Y2k_compliance Boolean
Force 2000 compatibility (problems in incompatible browsers).

Allow_call_time_pass_reference Boolean
Whether to enable forcing arguments to be passed by reference when the function is called. This method has not been approved and is likely to no longer be supported in future versions of Php/zend. The encouraged method is to specify in the function definition which parameters should be passed by reference. Encourage everyone to try turning off this option and making sure that the script works correctly to ensure that the script will run in a future release (each time you use this feature you will receive a warning that parameters will be passed by value instead of by reference).

Passing parameters by reference when the function is invoked is not recommended because it affects the cleanliness of the code. If a function's argument is not declared as a reference, the function can modify its parameters through a method that is not written to the document. To avoid side effects, it is best to specify that the parameter is passed by reference only when the function is declared.

See explanation of references.

expose_php Boolean
Decide whether to expose PHP that is installed on the server (for example, by adding its signature to the WEB server's information header). There is no security threat, just to let the client know if PHP is installed on the server.

Zend.ze1_compatibility_mode Boolean
Enable Zend Engine 1 (PHP 4) Compatibility mode. This affects the copying, construction, and comparison of objects.

See porting from PHP 4 to PHP 5.

Resource limits
Table G-5. Resource limits

Name default to modify range update record
Memory_limit "8M" Php_ini_all

The following is a brief explanation of the configuration options.

Memory_limit integer
This directive sets the maximum number of bytes of memory that a script can request. This helps prevent poorly written scripts from consuming the available memory on the optical server. To use this directive, it must be activated at compile time. Therefore, the Configure line should include:--enable-memory-limit. If you do not need any memory restrictions, you must set it to-1.

From 4.3.2 onwards, when the memory_limit,php function Memory_get_usage () is activated, it can be used.

When an integer type is used, its value is measured in bytes. You can also use the simplified notation, described in this FAQ.

See Also:max_execution_time.

Data processing
Table G-6. Data Processing configuration options

Name default value can modify range update record
Track_vars "on" Php_ini_??
Arg_separator.output "&" Php_ini_all available from PHP 4.0.5.
Arg_separator.input "&" Php_ini_perdir available from PHP 4.0.5.
Variables_order "Egpcs" Php_ini_all
Auto_globals_jit "1" Php_ini_perdir available from PHP 5.0.0.
register_globals "0" Php_ini_perdir is php_ini_all when PHP <= 4.2.3.
register_argc_argv "1" Php_ini_perdir is php_ini_all when PHP <= 4.2.3. The
Register_long_arrays "1" Php_ini_perdir is available from PHP 5.0.0.
Post_max_size "8M" Php_ini_perdir is php_ini_all when PHP <= 4.2.3. Available from PHP 4.0.3.
Gpc_order "GPC" Php_ini_all
Auto_prepend_file NULL php_ini_perdir is <= when PHP 4.2.3 Php_ini_all. The
Auto_append_file NULL Php_ini_perdir is php_ini_all when PHP <= 4.2.3.
Default_mimetype "text/html" Php_ini_all
Default_charset "" Php_ini_all
Always_populate_raw_post_data "0" Php_ini_perdir is php_ini_all in PHP <= 4.2.3. Available from PHP 4.1.0.
Allow_webdav_methods "0" Php_ini_perdir

The following is a brief explanation of the configuration options.

Track_vars Boolean
If activated, the environment variables, Get,post,cookie, and Server variables can be found in the global associative array, respectively: $_env,$_get,$_post,$_cookie and $_server.

Note since PHP 4.0.3, Track_vars is always open.

Arg_separator.output string
The delimiter in the URL generated by PHP to separate the arguments.

Arg_separator.input string
The delimiter list that PHP uses to parse URLs into variables.

Note: Each character in this instruction will be treated as a delimiter!

Variables_order string
Sets the order in which egpcs (environment,get,post,cookie,server) variables are parsed. The default setting is "Egpcs". For example, setting it to "GP" will cause PHP to completely ignore environment variables, cookies, and server variables, and use the GET method's variable to overwrite the variable with the same name as the POST method.

See Register_globals.

Auto_globals_jit Boolean
When enabled, SERVER and ENV variables are created after they are first used (Just in time), not until the script starts to run. If these variables are not always used in scripts, enabling this variable will improve server performance.

To make this option valid, PHP configuration options register_globals, Register_long_arrays, and register_argc_argv must be disabled.

Register_globals Boolean
Determines whether the egpcs (environment,get,post,cookie,server) variable is registered as a global variable.

Starting with PHP 4.2.0, this option defaults to OFF.

For information, please read the use of register_globals in the security chapter.

Note that register_globals cannot be set at runtime (Ini_set ()), although the above instructions can be used when the host is allowed. htaccess. An example of a. htaccess project: Php_flag register_globals off.

Note: Register_globals is affected by the Variables_order option.

REGISTER_ARGC_ARGV Boolean
Determines whether PHP defines argv & ARGC variables (may contain get information).

See command-line mode. In addition, this option is available from PHP 4.0.0 and is always "on" before.

Register_long_arrays Boolean
Sets whether PHP registers a pre-defined variable such as an obsolete $HTTP _*_vars. If on (the default), PHP variables like $HTTP _get_vars are registered. If not used, it is recommended to turn this option off for performance reasons, instead of using a hyper global array such as $_get instead.

This instruction is available from PHP 5.0.0.

Post_max_size integer
Sets the maximum size allowed for POST data. This setting also affects file uploads. To upload a large file, the value must be greater than upload_max_filesize.

If the memory limit is activated in the configuration script, Memory_limit also affects file uploads. Generally speaking, memory_limit should be bigger than post_max_size.

When an integer type is used, its value is measured in bytes. You can also use the simplified notation, described in this FAQ.

If the POST data size is larger than post_max_size $_post and $_files superglobals will be empty. This can be proven in a number of ways, for example, by passing $_get variables to the script to process the data, i.e.

, and see if $_get[' processed '] is set.

Gpc_order string
Sets the order of Get/post/cookie variable parsing, which defaults to "GPC". For example, setting it to "GP" will cause PHP to ignore the cookie variable completely and overwrite the variable with the same name as the POST method with the variable of the GET method.

Note: This option is not available for PHP 4. Replace it with Variables_order.

Auto_prepend_file string
Specifies the file name that is automatically resolved before the primary file. The file is included in the same way that the include () function is called, so include_path is used.

The special value none disables automatic prefixes.

Auto_append_file string
Specifies the file name that is automatically parsed after the primary file. The file is included in the same way that the include () function is called, so include_path is used.

The special value none disables the automatic suffix.

Note: If the script terminates with exit (), the automatic suffix does not occur.

Default_mimetype string
Default_charset string
Since 4.0B4, PHP always defaults to the output character encoding in HTTP message header content-type:. To disable the sending of character sets, set this option to NULL.

Always_populate_raw_post_data Boolean
Always produces $HTTP _raw_post_data variable contains the original POST data. Otherwise, this variable is only generated when it encounters data that does not recognize the MIME type. However, a better way to access the raw POST data is php://input. $HTTP _raw_post_data is not available for enctype= ' multipart/form-data ' form data.

Allow_webdav_methods Boolean
Allows HTTP requests for WebDAV to be processed in PHP scripts (such as propfind,proppatch,move,copy, etc.). This option does not exist after PHP 4.3.2. If you want to get the POST data for these requests, also set Always_populate_raw_post_data.

See Magic_quotes_gpc,magic-quotes-runtime and Magic_quotes_sybase.

Paths and directories
Table G-7. Path and directory configuration options

Name default to modify range update record
Include_path ".;/ Path/to/php/pear "Php_ini_all
Doc_root NULL Php_ini_system
User_dir NULL Php_ini_system
Extension_dir "/path/to/php" Php_ini_system
Cgi.fix_pathinfo "1" php_ini_all
Cgi.force_redirect "1" php_ini_all
Cgi.redirect_status_env NULL Php_ini_all
Fastcgi.impersonate "0" Php_ini_all
Cgi.rfc2616_headers "0" Php_ini_all

The following is a brief explanation of the configuration options.

Include_path string
Specifies a set of directories for require (), include (), and Fopen_with_path () functions to find files. The format is similar to the system's PATH environment variable: A list of a set of directories, separated by colons under UNIX, separated by semicolons under Windows.

Example G-1. Unix include_path

Include_path= ".:/ Php/includes "


Example G-2. Windows include_path

Include_path= ".; C:/php/includes "


Used in the include path. A relative path can be allowed, which represents the current directory.

Doc_root string
The root directory of PHP on the server. Used only when not empty. If PHP is configured for Safe mode, files outside of this directory are not parsed. If PHP compiles without specifying Force_redirect, and you run PHP in CGI on any Web server (except IIS), you should set doc_root. The alternative is to use the following Cgi.force_redirect configuration options.

User_dir string
Use the base directory name of the PHP file under the user directory, such as public_html.

Extension_dir string
PHP is used to find the directory of dynamic connection extension libraries. See ENABLE_DL and DL ().

Extension string
The Dynamic Connection extension library that is loaded when PHP starts.

Cgi.fix_pathinfo Boolean
Provides true path_info/path_translated support for CGI. The previous behavior of PHP was to set path_translated to Script_filename, regardless of path_info. For more information on PATH_INFO, see CGI specifications. Setting this value to 1 causes PHP CGI to correct its path to conform to specifications. Set to 0 will make PHP behave the same as before. The default is zero. Users should fix their scripts using script_filename instead of path_translated.

Cgi.force_redirect Boolean
It is necessary to use Cgi.force_redirect to provide security when running PHP in a CGI manner on most Web servers. PHP defaults to ON. You can turn it off, but at your own risk.

Note: Windows users: It is safe to shut down under IIS, in fact it must be done. It must also be closed for use under OMNIHTTPD or Xitami.

Cgi.redirect_status_env string
If you open Cgi.force_redirect and do 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 it can go on.

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

Fastcgi.impersonate string
FastCGI in IIS (on an WINNT-based operating system) supports the ability to impersonate a client security token. This enables IIS to define the security context of the request on which the runtime is based. This feature is not supported by mod_fastcgi in Apache (03/17/2002). Set to 1 if you are running in IIS. The default is 0.

cgi.rfc2616_headers int
Specifies what header PHP uses when sending HTTP response codes. If set to 0,php send a Status: header, Apache and other Web servers are supported. If this option is set to 1,php, the RFC 2616-compatible header will be sent. Keep the value 0 unless you know what you're doing.

File Upload
Table G-8. File Upload configuration options

Name default to modify range update record
File_uploads "1" Php_ini_system is php_ini_all when PHP <= 4.2.3. Available from PHP 4.0.3.
Upload_tmp_dir NULL Php_ini_system
Upload_max_filesize "2M" Php_ini_perdir is php_ini_all when PHP <= 4.2.3.

The following is a brief explanation of the configuration options.

File_uploads Boolean
Whether to allow HTTP file uploads. See Upload_max_filesize,upload_tmp_dir and Post_max_size directives.

When an integer type is used, its value is measured in bytes. You can also use the simplified notation, described in this FAQ.

Upload_tmp_dir string
The temporary directory where files are stored when the file is uploaded. Must be a user-writable directory for the PHP process owner. If not specified, PHP uses the system default value.

Upload_max_filesize integer
The maximum size of the uploaded file.

When an integer type is used, its value is measured in bytes. You can also use the simplified notation, described in this FAQ.

Normal SQL
Table G-9. General SQL configuration Options

Name default to modify range update record
Sql.safe_mode "0" Php_ini_system

The following is a brief explanation of the configuration options.

Sql.safe_mode Boolean
Debugger configuration options
Attention
PHP 3 only implements a default debugger. For more information, please refer to Appendix E.

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

Debugger.port string
The port number used by the debugger.

Debugger.enabled Boolean
Whether the debugger is enabled.

  • 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.