phpini directive

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-07-29 09:02:381244browse

1. Scope directive
PHP_INI_PERDIR can be modified in php.ini, httpd.conf or .htaccess files
PHP_INI_SYSTEM can be modified in php.ini, httpd.conf files
PHP_INI_USER can be modified in user scripts
PHP_INI_ALL can be modified in any Local modification
2. It is only responsible for determining whether the PHP engine is available. If it is turned off, PHP cannot be used at all. Scope: PHP_INI_ALL Default value: on
engine = On | Off
3. Enable Zend Engine 1 (PHP 4) compatibility mode. This affects object copying, construction, and comparison.
zend.ze1_compatibility_mode = On | Off
Scope: PHP_INI_ALL Default value: off
4. The PHP script part is surrounded by escape syntax. There are 4 different escape formats. The shortest one is short open tag, as follows
short_open_tag = On | Off
Scope: PHP_INI_ALL Default value: off
Example:
echo "hello word";
?>
5. PHP supports asp-style script delimiters, as follows:
asp_tags = On | Off
Scope: PHP_INI_ALL Default value: off
Example:
<%
echo "hello word";
%>
6. PHP supports many data types, including floating point numbers. The precision parameter specifies the number of significant digits displayed in the floating point number representation. Note that this value is set to 12-bit on Win32 systems and 14-bit on Linux.
precision = integer
Scope: PHP_INI_ALL Default value: 14
7. In order to eliminate the problems caused by non-Y2K-compliant (non-Y2K-compliant) software, too much effort is spent, and some people are still using outdated software Incompatible browsers, if for some special reason, some users of the site do. Then disable the y2k_compliance parameter, otherwise enable output_buffering
y2k_compliance = On | Off
Scope: PHP_INI_ALL Default value: On
output_buffering = On | Off | integer
Scope: PHP_INI_ALL Default value: 4096
8. Return the output to Pass all output to a function before requesting the user. For example, suppose you wish to compress all output before returning it to the browser. All major HTTP/1.1-compliant browsers support this feature.
output_handler = string
Scope: PHP_INI_SYSTEM Default value: NULL
The browser needs to support the following features:
output_handler = 'ob_gzhandler'
9. Compress the output before returning it to the browser, which can save bandwidth and time. You can enable output compression and set the compression buffer size (in bytes) at the same time
zlib.output_compression = On | Off | integer
Scope: PHP_INI_SYSTEM Default value: Off
10. If the zlib library is not available, zlib.output_handler A specific compression library will be formulated
zlib.output_handler = string
zlib.output_compression = On | Off | integer
Scope: PHP_INI_SYSTEM Default value: NULL
11. When implicit_flush is enabled, each time print() or echo() is called, And when each embedded html block is completed, the output buffer of its content will be automatically cleared or flushed. This can be useful when the server takes a very long time to compile results or complete certain calculations. This feature can be used to output status updates to the user instead of waiting for the server to complete the entire process.
implicit_flush = On | Off
zlib.output_compression = On | Off | integer
Scope: PHP_INI_SYSTEM Default value: Off
12. Can control the response of the deserializer when requesting to instantiate an undefined class. For most users, this directive will not matter. If PHP's error reporting is set to the appropriate level, PHP will output a warning for these situations.
unserialize_callback_func = string
Scope: PHP_INI_ALL Default value: 100
13. Determine the number of digits stored after the decimal point when serializing double-precision and single-precision floating point numbers. Setting this parameter to an appropriate value ensures that these numbers will be deserialized without loss of precision
serialize_precision = integer
Scope: PHP_INI_ALL Default value: 100
14. Function parameters can be passed in two ways: by value and by Reference
allow_call_time_pass_reference = On | Off
Scope: PHP_INI_SYSTEM Default value: Off
15. Enabling the safe_mode directive will make PHP run under the above constraints
safe_mode = On | Off
Scope: PHP_INI_SYSTEM Default value: Off
16. Enable In safe mode, if safe_model_gid is also enabled, GID (group ID) checking will be forced when opening the file. When safe_mode_gid is disabled, a more stringent UID (user ID) check will be forced to complete.
safe_mode_gid = On | Off
Scope: PHP_INI_SYSTEM Default value: Off
17. When safe_mode and safe_mode_gid are enabled, safe_mode_include_dir provides a safe haven , which can avoid forced UID/GID checking.When opening a file from the specified directory, the UID/GID check will be ignored
safe_mode_include_dir = string
Scope: PHP_INI_SYSTEM Default value: NULL
18. Enabling the safe_mode_exec_dir parameter will limit the exec() function to only execute executable programs in the specified directory.
safe_mode_exec_dir = string
Scope: PHP_INI_SYSTEM Default value: NULL
Example:
safe_mode_exec_dir = "/usr/local/bin"
19. When enabling safe mode, you can use the safe_mode_allowed_env_vars directive to restrict users from modifying the operating system environment through PHP scripts variable.
safe_mode_allowed_env_vars = string
Scope: PHP_INI_SYSTEM Default value: PHP_
Example:
safe_mode_allowed_env_vars = "PHP_" If empty, any environment variable can be modified
20. safe_mode_protected_env_vars can clearly prevent modification of certain environment variables.
safe_mode_protected_env_vars = string
Scope: PHP_INI_SYSTEM Default value: LD_LIBRARY_PATH
li:
safe_mode_protected_env_vars = "PATH, LD_LIBRARY_PATH"
21. open_basedir can create a base directory, and all file operations are restricted to this directory. Prevent users from entering other restricted areas of the server
open_basedir = string
Scope: PHP_INI_SYSTEM Default value: NULL
li:
open_basedir = "/home/www/"
22. In some environments, certain uses are completely prohibited Default function.
disable_functions = string
Scope: PHP_INI_SYSTEM Default value: NULL
li: disable_functions = "exec, system"
23. Disable certain classes in some class libraries
disable_classes = string
Scope: PHP_INI_SYSTEM Default value : NULL
disable_classes = 'vector, graph'
24. Enabling ignore_user_abort will cause the server to ignore session aborts caused by interruptions caused by users or browsers.
ingore_user_abort = Off | On
Scope: PHP_INI_ALL Default value: Off
25. Set the upper limit for PHP script execution time in seconds. If set to 0, the maximum limit will be cancelled.
max_execution_time = integer
Scope: PHP_INI_ALL Default value: 30
26. Set a limit on the time used by PHP scripts to parse request data, in seconds.
max_input_time = integer
Scope: PHP_INI_ALL Default value: 60
27. The maximum amount of memory allocated to PHP scripts, in MB
memory_limit = integerM
Scope: PHP_INI_ALL Default value: 128M
28. PHP can automatically generate URLs , and use the standard ampersand to separate input variables.
arg_separator.output = string
Scope: PHP_INI_ALL Default value: &
29, & is the standard character used by the POST or GET method to separate the input variables passed in.
arg_separator.input = string
Scope: PHP_INI_ALL Default value: ;&
30. Specify the parsing order of ENVIRONMENT, GET, POST, COOKIE and SERVER variables. If register_globals is enabled, the order of these values ​​can lead to unpredictable results, because later variables will overwrite previously parsed values.
variables_order = string
Scope: PHP_INI_ALL Default value: GPCS
31. All external variables are automatically registered in the global scope, that is, variables of ENVIRONMENT, GET, POST, COOKIE and SERVER types are globally available. Because it is globally available, it can be modified globally. Then it could only be managed through cookies, but now the URL can also be modified.
register_globals = On | Off
Scope: PHP_INI_SYSTEM Default value: Off
li:
http://ww.example.com/secretdata.php?sessi >
32. Determine whether to continue to use the deprecated syntax to register various input arrays (ENVIRONMENT, GET, POST, COOKIE and SERVER).
register_long_arrays = On | Off
Scope: PHP_INI_SYSTEM Default value: Off
33. Passing in variable information through the GET method is similar to passing parameters to an executable file.
register_argc_argv = On | Off
Scope: PHP_INI_SYSTEM Default value: Off
34. Of the two methods of passing data between requests, POST is more conducive to large amounts of data, such as content passed through web forms.
For security and performance reasons, you may want to place an upper limit on the data passed through PHP scripts in this direction.
post_max_size = integerM
Scope: PHP_INI_SYSTEM Default value: 8M
35. Whether to enable magic quotes for data transmitted by GET, POST and cookie methods. When enabled, all single quotes, double quotes, backslashes and null characters are reversed. Slashes are automatically defined
magic_quotes_gpc = On | Off
Scope: PHP_INI_SYSTEM Default value: Off
36. All quotes in data from external resources (such as databases or text files) will be automatically escaped (using backslashes)
magic_quotes_runtime = On | Off Scope: PHP_INI_ALL Default value: Off 37. All data from external resources will be escaped using a single quote instead of a backslash. If it comes from a Sybase database, the escaped characters are not backslashes, but non-traditional single quotes. (Only useful if magic_quotes_runtime is turned on)
magic_quotes_sybase = On | Off
Scope: PHP_INI_ALL Default value: Off
38. Before the PHP script is executed, you need to create a header template or import a code library, which is usually done using the include() or require() function.
This process can be automated by specifying the file name and corresponding path in the auto_prepend_file directive and pre-importing these functions in the script.
auto_prepend_file = string
Scope: PHP_INI_SYSTEM Default value: NULL
39. When automatically inserting the footer template after the PHP script is executed, it is usually done using the include() or require() function. You can specify the file name and corresponding value in the auto_append_file directive path to automate this process and pre-import these functions in the script.
auto_append_file = string
Scope: PHP_INI_SYSTEM Default value: NULL
40. MIME types provide a standard method for classifying Internet file types. Any file type can be served via PHP applications, the most common being text/html. If you use the content generator of PHP or WML (wireless markup language, wireless markup language) applications in other ways, you need to change the MIME type accordingly.
default_mimetype = string
Scope: PHP_INI_ALL Default value: text/html
41. Update character set settings
default_charset = string
Scope: PHP_INI_ALL Default value: iso-8859-1
42. Assign a string to the variable $HTTP_RAW_POST_DATA. Contains name/value pairs passed via the POST method.
always_populate_raw_post_data = On | Off
Scope: PHP_INI_PERDIR; Default value: Off
43. The specified path is the basic path used by functions such as include(), require(), fopen_with_path(), etc. Multiple directories can be specified. Between each directory Separate with semicolons.
include_path = string
Scope: PHP_INI_ALL Default value: NULL
li:
include_path = ".:/usr/local/include/php;/home/php"
44. Provide the default location of all PHP scripts. This parameter is not Will be used only when empty.
doc_root = string
Scope: PHP_INI_SYSTEM Default value: NULL
45. Use /~username to specify the absolute directory used by PHP when opening a file.
user_dir = string
Scope: PHP_INI_SYSTEM Default value: NULL
46. The location of PHP loadable extensions (modules)
extension_dir = string
Scope: PHP_INI_SYSTEM Default value: ./ (default ext on Windows)
47. Allow users Load PHP extensions at runtime, that is, loaded during script execution
enable_dl = On | Off
Scope: PHP_INI_SYSTEM Default value: Off
48. Remote files can be regarded as local files. When enabled, PHP scripts are able to modify files on the remote file server if they have the correct permissions.
allow_url_fopen = On | Off
Scope: PHP_INI_ALL Default value: On
49. The anonymous user password used to complete the FTP connection, rather than the identity.
form = string
Scope: PHP_INI_ALL Default value: On
Example:
form = 'jason@example.com'
50. PHP will always send a content header with the processed output, which contains a user agent attribute.
user_agent = string
Scope: PHP_INI_ALL Default value: NULL
51. Determine the timeout value of the stream eager to the socket, in seconds
default_socket_timeout = integer
Scope: PHP_INI_ALL Default value: 60
52. It is not used by the operating system Different syntax, so there will be problems with line terminators
auto_delect_line_endings = On | Off
Scope: PHP_INI_ALL Default value: Off
53. Used to dynamically load a specific module.
extension = string
Scope:PHP_INI_ALL Default value: NULL
li:
extensioni = php_bz2.dll

The above introduces the phpini command, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
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