php.ini PHP configuration file Chinese version (PHP7, PHP8)

php.ini Chinese version (PHP7, PHP8) php.ini configuration options list¶. You can use the following configuration options in php.ini to configure PHP.

php.ini PHP configuration file Chinese version (PHP7, PHP8)-1

;;;;;;;;;;;;;;;;;;
;; about .ini ;;
;;;;;;;;;;;;;;;;;;
; For server modules, php.ini is read only once, when the server starts. For CGI and CLI, php.ini is read on every call.

; PHP will search for this file in the following order during initialization (stop when it finds one):
; 1. Location specified by the SAPI module:
; (a) PHPIniDir directive in Apache 2.x
; (b) -c command line option in CGI/CLI mode
; (c) php_ini parameters in NSAPI
; (d) PHP_INI_PATH environment variable in THTTPD
; 2. The location specified by the PHPRC environment variable
; 3. The location specified by the Windows registry (search in sequence and stop when found):
; (a) The value of IniFilePath in [HKEY_LOCAL_MACHINE\SOFTWARE\PHP\xyz] (specific to php-xyz version)
; (b) The value of IniFilePath in [HKEY_LOCAL_MACHINE\SOFTWARE\PHP\xy] (specific to php-xy* series versions)
; (c) The value of IniFilePath in [HKEY_LOCAL_MACHINE\SOFTWARE\PHP\x] (specific to the php-x.*.* series version)
; (d) The value of IniFilePath in [HKEY_LOCAL_MACHINE\SOFTWARE\PHP] (not specific to PHP version)
; 4. Current working directory (not applicable to CLI mode)
; [Tip] Apache will change the current working directory to the root directory when it starts, which will cause PHP to try to read php.ini in the root directory.
; 5. The web server directory (for SAPI modules) or the directory where PHP is located (other cases under Windows)
; 6. The location specified by the compile-time option --with-config-file-path or the Windows directory (%SystemRoot% is usually "C:\Windows")

; If php-SAPI.ini exists (such as php-apache2handler.ini, php-fpm-fcgi.ini, php-cli-server.ini, php-cli.ini, etc.),
; then php.ini will be replaced by php-SAPI.ini.

; Latest version:
; php.ini-production
; php.ini-development

;;;;;;;;;;;;
;; grammar;;
;;;;;;;;;;;;
; The syntax of this file is very simple. Blank lines and lines starting with a semicolon are simply ignored.
; Ordinary configuration section headers (e.g. [PHP]) are also simply ignored (even though they may have some meaning in the future).

; A configuration segment like [PATH=/www/mysite] means that it only applies to PHP files in the /www/mysite directory.
; A configuration section such as [HOST=www.example.com] only applies to http://www.example.com The PHP files for your site.
; [Tip] For sites with multiple domain names, the value of the SERVER_NAME parameter (that is, the first domain name in the domain name list) should be used.
; The settings in these two configuration sections cannot be modified at runtime and are not affected by the .user.ini file.
; These two configuration sections only work in CGI/FastCGI mode [FastCGI Protocol Specification Chinese Version] and cannot contain extension and zend_extension instructions.

; The format of the setting instruction is as follows:
; command = value
; "Directives" are case sensitive! So "foo=bar" is not the same as "FOO=bar".
; Unrecognized "commands" will be ignored directly, and unset commands will use their default values.
; "value" can be:
; 1. A string (can be delimited by quotes, e.g. "foo")
; 2. A number (integer or floating point, such as: 0, 1, 34, -1, 33.55)
; 3. A PHP constant (eg: E_ALL, M_PI) (cannot be used outside of php.ini [eg httpd.conf])
; 4. An INI constant (On, Off, Yes, No, None)
; 5. An expression (e.g. E_ALL & ~E_NOTICE)
; [Note 1] You can reference environment variables in "value", such as: "${AUTHOR}.log", ".:${USER}/pear/php"
; [Note 2] You can reference previously set directive values in "value", such as: "${open_basedir}:/new/dir"

; Only bitwise operators, logical negation, and parentheses can be used in expressions:
; | Bitwise OR
; ^ Bitwise exclusive OR (XOR)
; & Bitwise AND
; ~ bitwise NOT
; ! Logical NOT

; Boolean flags are turned on with 1, On, True, Yes, and turned off with 0, Off, False, No.

; An empty string can be represented by writing nothing after the equal sign, or by using the None keyword:
; foo = ; Set foo to an empty string (recommended)
; foo = None ; Set foo to an empty string
; foo = "None" ; Set foo to the string 'None'

; If you want to use constants from dynamic extensions (PHP extensions or Zend extensions) in directive values,
; Then these constants can only be used after loading these dynamic extension instruction lines (extension or zend_extension).

;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Production environment and development environment;;
;;;;;;;;;;;;;;;;;;;;;;;;;;
; PHP provides two reference configurations for production and development environments: php.ini-production and php.ini-development.
; The differences between the two reference configurations are as follows:

;display_errors
; Default Value: On
; Development Value: On
; Production Value: Off

;display_startup_errors
; Default Value: On
; Development Value: On
; Production Value: Off

;error_reporting
; Default Value: E_ALL
; Development Value: E_ALL
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT

;log_errors
; Default Value: Off
; Development Value: On
; Production Value: On

;max_input_time
; Default Value: -1 (Unlimited)
; Development Value: 60 (60 seconds)
; Production Value: 60 (60 seconds)

;output_buffering
; Default Value: Off
; Development Value: 4096
; Production Value: 4096

;register_argc_argv
; Default Value: On
; Development Value: Off
; Production Value: Off

;request_order
; Default Value: None
; Development Value: "GP"
; Production Value: "GP"

;session.gc_divisor
; Default Value: 100
; Development Value: 1000
; Production Value: 1000

;session.sid_bits_per_character
; Default Value: 4
; Development Value: 5
; Production Value: 5

;short_open_tag
; Default Value: On
; Development Value: Off
; Production Value: Off

;variables_order
; Default Value: "EGPCS"
; Development Value: "GPCS"
; Production Value: "GPCS"

;zend.exception_ignore_args
; Default Value: Off
; Development Value: Off
; Production Value: On

;zend.exception_string_param_max_len
; Default Value: 15
; Development Value: 15
; Production Value: 0

;;=========================================================================================
;;=====================================Detailed explanation of configuration instructions========================================
;;=========================================================================================
; The values of each of the following directives are the same as the default values built into PHP-8.0 (also taking into account PHP-7.2 PHP-7.3 PHP-7.4 versions).
; That is, if 'php.ini' does not exist, or you delete some lines, the default values will be the same.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; SAPI (Server API) ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[apache2handler]
; The directives in this configuration section only make sense when using PHP as an Apache2 handler module (php_module).
; [Tip] You can use the php_value/php_flag and php_admin_value/php_admin_flag directives in httpd.conf to override the settings in php.ini.

engine = On
; Whether to enable the PHP parsing engine. Generally used to turn on and off the PHP parsing engine 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 to parse files as PHP scripts regardless of their extension as long as they have executable bits.

[fpm-fcgi]
; The directives in this configuration section only make sense when using PHP in FPM/FastCGI mode.

cgi.check_shebang_line = On
; Whether to check for a line starting with #! at the top of the script (shebang).
; This shebang is required if the script is to be run both standalone and in PHP CGI mode.
; Setting it to On means that this line will be automatically ignored in CGI mode.

cgi.discard_path = Off
; Whether to allow placing the PHP CGI directory outside the web directory tree to enhance security so that clients cannot bypass .htaccess security protections.

cgi.fix_pathinfo = On
; Whether to provide real PATH_INFO/PATH_TRANSLATED values for CGI (comply with the cgi specification).
; The previous behavior was to set PATH_TRANSLATED to SCRIPT_FILENAME regardless of PATH_INFO.
; Turning this directive on will cause PHP to fix its paths to comply with the CGI specification, otherwise it will still use the old non-compliant behavior.
; You are encouraged to turn this directive on and fix your scripts to use SCRIPT_FILENAME instead of PATH_TRANSLATED .
; [Tip] Even if you use PHP-FPM with Nginx, you should keep this directive On (there are many old articles on the Internet).
; See the cgi specification for more information on PATH_INFO.

cgi.force_redirect = On
; Whether to enable CGI forced redirection. It is strongly recommended to enable it to improve security.
; NOTE: This must be turned off on IIS!

cgi.nph = Off
; Whether to force all requests to send a "Status: 200" status code in CGI mode.

cgi.redirect_status_env =
; If cgi.force_redirect = On and running PHP with something other than Apache,
; You may need to set a cgi redirection environment variable name, and PHP will decide whether to continue execution based on this environment variable.
; Setting this variable may lead to security vulnerabilities, please make sure you know what you are doing before setting it.

cgi.rfc2616_headers = Off
; Specifies which status header PHP should use when sending HTTP response codes.
; Setting it to Off means using headers that comply with the RFC3875 standard (e.g. "Status: 404 Not Found"), which is supported by Apache and other web servers.
; Setting it to On means using headers that comply with the RFC2616 standard (for example, "HTTP/1.0 404 Not found").
; Always keep the default value Off unless you really know what you are doing.

fastcgi.error_header =
; If display_errors = Off and the accessed PHP script contains syntax errors,
; then by default, the user will receive an empty page with a status line of "HTTP/1.1 500 Internal Server Error".
; If you think the default status line is unreasonable, you can use this directive to customize a status line (for example, "HTTP/1.1 550 Server Exploded").

fastcgi.impersonate = Off
; FastCGI in IIS supports the ability to impersonate client security tokens, which enables IIS to define the security context on which runtime requests are based.
; However, Apache does not support this feature. If running in IIS, it should be set to On, otherwise it should be set to Off.

fastcgi.logging = On
; Whether to enable FastCGI logging.

fpm.config =
; Explicitly specify the path to the FPM configuration file (php-fpm.conf)

[cli-server]
; The directives in this configuration section are only valid when using PHP's built-in CLI Web Server.

cli_server.color = Off
; Whether to have the CLI Web Server use colors in terminal output.

[cli]
; The instructions in this configuration section only make sense when using the PHP command line mode (actually setting the readline module).

cli.pager =
; External pager for displaying command line output.

cli.prompt = "\b \>"
; Command line prompt when used interactively.

;;;;;;;;;;;;;;;;;;;
;; Core;;
;;;;;;;;;;;;;;;;;;;

[Core-Language]

short_open_tag = On
; Is it allowed to use " "Short mark.
; Unless your PHP program is only run in a controlled environment and is only for your own use, please do not use short tags.
; If you want to use PHP with XML, you can choose to turn this option off to facilitate direct embedding" ".
; This directive does not affect the abbreviation form"

precision = 14
; Display precision of floating point data (number of significant digits).

serialize_precision = -1
; The precision (number of significant digits) when storing float and double data serially.
; The default value of -1 means automatically selecting the best precision, which is just enough to ensure that no data is lost when floating point data is decoded by the deserializer.
; This value also affects the precision of double data encoded by json_encode().

disable_functions =
; This directive accepts a comma-separated list of function names to disable specific functions.
; This instruction can only disable built-in functions, not user-defined functions.

disable_classes =
; This directive accepts a comma-separated list of class names to disable specific classes.

expose_php = On
; Whether to expose the fact that PHP is installed on the server (add its signature to the http header).
; It does not pose a direct security threat, but it makes the client aware that PHP is installed on the server.

hard_timeout = 2
; When the script execution time reaches the max_execution_time limit, it will be terminated "softly and safely".
; This instruction sets the maximum allowed time (in seconds) for ending the script in this "soft and safe" way.
; Once the timeout (default is 2 seconds), it will be terminated in a rough manner (without releasing any unreleased resources).

zend.assertions = 1
; How to compile assertions:
; -1 Do not compile at all (production mode)
; 0 Compile but skip at runtime
; 1 Compile and execute (development mode)

zend.exception_ignore_args = Off
; Whether to exclude arguments from the stack trace generated by the exception.
; Recommended to be set to On on production servers to prevent sensitive information from being output in stack traces.

zend.exception_string_param_max_len = 15
; Maximum string length allowed in stack trace parameters (value range = 0~1000000).
; Only makes sense when zend.exception_ignore_args = Off.
; It is recommended to set it to 0 on production servers to reduce the output of sensitive information.

zend.multibyte = Off
; Whether to allow PHP scripts to use unsafe character encodings such as CP936, Big5, CP949, Shift_JIS.
; Safe character encodings compatible with ISO-8859-1 (UTF-8, EUC, ...) do not need to enable this directive.
; To use this feature, the mbstring extension module must be loaded.

zend.script_encoding =
; The default character encoding used when there is no "declare(encoding=...)" statement in the first line of a PHP script.
; After setting this directive, the script will automatically use the mb_convert_encoding() function.
; Automatically convert all strings from zend.script_enconding to mbstring.internal_encoding.
; Only meaningful when zend.multibyte = On.
; If your script uses a character encoding that is not compatible with ISO-8859-1, it is recommended to set this directive explicitly.

zend.detect_unicode = On
; Whether to detect whether the script contains multi-byte characters by checking the script's BOM (byte order mark).
; Only meaningful when zend.multibyte = On.

zend.signal_check = Off
; Whether to check for replaced signal handlers on shutdown (Unix only)

[Core-ResourceLimits]

memory_limit = 128M
The maximum memory (bytes) that the script can request (can use K and M as units) (must be greater than the value of post_max_size)
; This helps prevent bad scripts from consuming all the memory on the server. Setting this to -1 removes the memory limit.
; After setting this directive, the memory_get_usage() function will become available.

[Core-Performance]

realpath_cache_size = 4M
; Specify the realpath (normalized absolute path name) buffer size used by PHP.
; Buffer size = total length of path string + cache item associated data. When caching mainly long paths, the cache must be larger.
; This value does not directly control the number of paths in the cache. On systems where PHP opens a large number of files this value should be increased to improve performance.
; NOTE: realpath cache will be disabled when open_basedir is enabled.

realpath_cache_ttl = 120
; Realpath cache validity period (seconds). For systems where files rarely change, this value can be increased to improve performance.

[Core-DataHandling]

arg_separator.output = "&"
; The separator used to separate parameters in the URL output by PHP.
; It can also be set to "&" or "," or ";" and so on.

arg_separator.input = "&"
; List of separators used by PHP when parsing variables in URLs. Every character in the string will be treated as a separator.
; It can also be set to ";,&" and so on.

variables_order = "EGPCS"
; Which superglobal arrays to register. Use E, G, P, C, S to represent $_ENV, $_GET, $_POST, $_COOKIE, $_SERVER respectively.
; Because registering these arrays will incur performance losses, and $_ENV is not commonly used, it is not recommended to register $_ENV.
; [Tip] In FastCGI mode, $_SERVER always contains environment variables (that is, S is always equivalent to ES).
; It is recommended to set it to "GPCS" and use getenv() to access environment variables.

request_order =
; How to register elements of the G, P, C superglobal arrays to the $_REQUEST superglobal array.
; This setting not only determines which of G, P, and C are registered, but also determines the overwriting order when registering (the later value will overwrite the previous value).
; [Note] Setting it to empty means inheriting the value of variables_order instead of leaving $_REQUEST empty. It is recommended to set it to "GP".

auto_globals_jit = On
; Whether to create the $_ENV, $_REQUEST, $_SERVER variables only when they are actually used (rather than automatically when the script is started).
; If these arrays are not used in the script, turning this directive on will improve performance.

register_argc_argv = On
; Whether to register $argv and $argc global variables (may contain information of GET method).
; The $argv array contains all the arguments passed to the script. The $argc variable holds the number of arguments.
; It is recommended to turn off this directive to improve performance.
; [Tip] For CLI mode, this command is hardcoded to On

enable_post_data_reading = On
; Whether to allow reading POST data. If set to Off, $_POST and $_FILES will always be empty.
; The only way to get the POST data is via the php://input stream wrapper.
; Off is only suitable for proxying requests or processing POST data in a memory-efficient manner.

post_max_size = 8M
; Maximum POST data length (bytes) allowed to be accepted ("0" means unlimited). Only meaningful when enable_post_data_reading = On.
This setting also affects file uploads (must be larger than the value of upload_max_filesize). If the POST data exceeds the limit, $_POST and $_FILES will be empty.
If memory limiting is enabled, this value should be less than the value of memory_limit.

auto_prepend_file =
auto_append_file =
; Filenames to automatically insert before/after PHP scripts. Set to empty to disable this feature.
; The specified file is included as if by the include() function, so the value of the include_path directive will be used.
; NOTE: If the script is terminated via exit() then automatic postfixing will not occur.

default_mimetype = "text/html"
default_charset = "UTF-8"
; Set the default value of HTTP header "Content-Type:". Setting both to empty means no "Content-Type:" header will be output.
; The default value means outputting "Content-Type: text/html; charset=UTF-8".
; Deprecate setting default_charset to empty.

input_encoding =
; Character encoding used by PHP input. Setting this to empty means using the value of default_charset.

output_encoding =
; Character encoding used by PHP output. Setting this to empty means using the value of default_charset.

internal_encoding =
; The character encoding used internally by PHP. Setting it to empty means using the value of default_charset.

[Core-Paths]

include_path = ".;/path/to/php/pear"
; Specify a set of directories for require(), include(), fopen(), file(), readfile(), file_get_contents() ... and other functions to locate files.
; The format is similar to the system's PATH environment variable (separated by colons in UNIX and semicolons in Windows):
; UNIX: "/path1:/path2"
; Windows: "\path1;\path2"
; Using './path/to/file' directly to represent files relative to the current directory is a more efficient way (it is not recommended to use '.' in this command).
; Furthermore, setting this directive to empty can help improve the performance of locating files on the file system.
; The value of this directive can be modified at runtime using set_include_path().

open_basedir =
; Limit all files that PHP is allowed to operate to this group directory list to improve security (setting it to empty means allowing all files to be opened).
; When the script attempts to open a file outside the specified directory tree, it will be rejected.
; All symbolic links are resolved, so it is not possible to circumvent this restriction by using symbolic links.
; The special value '.' means that the directory where the script is stored will be used as the base directory, but this is not safe (the script can use chdir() to change the working directory).
; For shared servers, it will be very useful to flexibly set this directive in httpd.conf for different virtual hosts or directories.
; When used as an Apache module, the open_basedir path in the parent directory will be automatically inherited.
; In Windows, semicolons are used to separate directories, and in UNIX systems, colons are used to separate directories. It is recommended to use the PATH_SEPARATOR constant to write portable code.
; NOTE: When this feature is enabled realpath caching will be disabled.

doc_root =
; PHP's "CGI root directory". Only valid if non-empty.
; Placing executable programs/scripts in the web server's main document directory (such as "htdocs") is considered unsafe.
; For example, due to configuration errors, the script is displayed as ordinary HTML.
; Therefore, many system administrators will set up a directory outside the main document directory that can only be accessed through CGI.
; The contents of this directory will only be parsed and not displayed as is.
; If this directive is set, PHP will only interpret files in the doc_root directory.
; and ensure that no scripts outside of the directory will be executed by the PHP interpreter (except user_dir).
; If FORCE_REDIRECT was not specified when compiling PHP, this directive must be set.
; If running as CGI on a non-IIS server, be sure to read the security section in the manual.
; A safe alternative is to use the cgi.force_redirect directive.

user_dir =
; Tells PHP which directory to look for when opening a script with /~username. This is only valid when it is not empty.
; That is, use the basic directory name of the PHP file under the user directory, for example: "public_php"

user_ini.cache_ttl = 300
; The number of seconds between rereading the .user.ini file (the lifetime of the .user.ini file).

user_ini.filename = ".user.ini"
; The name of a user-defined php.ini file on a per-directory basis (only supported in CGI/FastCGI mode). Setting this to empty means disabling this feature.
; When this feature is enabled, in addition to the main php.ini, it will also scan from the directory where the executed PHP script is located, all the way up to the web root directory.
; If the executed PHP script is outside the web root directory, only the directory where the PHP script is located will be scanned.
; Only PHP_INI_PERDIR and PHP_INI_USER type directives are allowed in .user.ini files.
; Enabling this feature will make the PECL htscanner extension obsolete.

extension_dir = "/path/to/phpext"
; The directory where extension libraries (modules) are stored, which is also the directory that PHP uses to find dynamic extension modules.
; The default value for Windows is "C:\php\ext"
; The default value on Unix depends on the compile-time configuration.

sys_temp_dir = "/path/to/tmp"
; Temporary directory for temporary files. The default is the system's temporary directory (see sys_get_temp_dir() function)

;extension=PHP module name (without prefix and suffix, such as mbstring)
;zend_extension=Zend module name (without prefix and suffix, for example opcache )
; For modules that are not in the extension_dir directory, you can directly write the full absolute path of the module file.
; [Note] The exif module must be loaded after mbstring

[Core-FileUploads]

file_uploads = On
; Whether to allow HTTP file upload. See upload_max_filesize, upload_tmp_dir, post_max_size directives.

upload_tmp_dir =
; Temporary directory for storing uploaded files (must be a directory writable by the PHP process). Setting it to empty means using the system default temporary directory.
; If the specified directory is not writable, the system default temporary directory will be automatically used.
; If open_basedir is set, it must contain the system default temporary directory, otherwise the upload function will not work.

upload_max_filesize = 2M
The maximum size of the file allowed to be uploaded (must be smaller than the value of post_max_size).

max_file_uploads = 20
; The maximum number of files that can be uploaded simultaneously in one HTTP request.

[Core-Windows]

windows.show_crt_warning = Off
; Whether to display C runtime warning messages (only available on Windows platforms)

;;;;;;;;;;;;;;;;;;;;;
;; Core Extensions;;
;;;;;;;;;;;;;;;;;;;;;

[DateTime]
; The first four configuration options are currently only used by 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.833333
; Default sunrise zenith
date.sunset_zenith = 90.833333
; Default sunset zenith

date.timezone =
; Default time zone used for all date and time functions when the TZ environment variable is not set.
; Mainland China should use "PRC" or "Asia/Shanghai"
; The order of precedence for applying time zones is:
; 1. The time zone set by the date_default_timezone_set() function (if set)
; 2. TZ environment variable (if non-empty)
; 3. The value of the command (if set)
; 4. PHP guesses it itself (if the operating system supports it)
; 5. If none of the above works, use "UTC"

[ErrorHandling]

error_reporting = E_ALL
; What the error report should contain (overlay of bit fields):
; 1 E_ERROR Fatal runtime error
; 2 E_WARNING Runtime warning (non-fatal error)
; 4 E_PARSE Compile-time parsing error
; 8 E_NOTICE Runtime warning (usually a bug, but may be intentional)
; 16 E_CORE_ERROR Fatal error during initialization when PHP is started
; 32 E_CORE_WARNING Warning during the initialization process when PHP starts (non-fatal error)
; 64 E_COMPILE_ERROR Fatal error during compilation
; 128 E_COMPILE_WARNING Compile-time warning (non-fatal error)
; 256 E_USER_ERROR User-defined fatal error
; 512 E_USER_WARNING User-defined warning (non-fatal error)
; 1024 E_USER_NOTICE User-defined reminder (often a bug, but may be intentional)
; 2048 E_STRICT Encoding standardization warning (suggestions on how to modify for forward compatibility)
; 4096 E_RECOVERABLE_ERROR Near-fatal runtime error, treated as E_ERROR if not caught
; 8192 E_DEPRECATED Warns about code that may not work properly in future versions
; 16384 E_USER_DEPRECATED User-defined warning (warning about code that may not work properly in future versions)
; 32767 E_ALL All errors and warnings above
; [NOTE] These constants cannot be used outside of php.ini (must use numeric values).
; The development environment can be set to 2147483647 (all binary bits are 1) to turn on various errors and warnings that may appear now or in the future.
; On production servers, it is recommended to set it to E_ALL & ~E_DEPRECATED & ~E_STRICT to avoid excessive performance loss.
; To further improve performance, consider setting it to E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR (only errors)

display_errors = On
; Whether to display error messages as part of the output.
; On final production web sites, it is strongly recommended that you turn this feature off and use error logging instead.
; Enabling this feature in the final published web site may expose some sensitive information.
; Special values STDOUT and STDERR are only available in CGI/CLI mode (CLI mode default = STDOUT).

display_startup_errors = On
; Whether to display errors when PHP starts (PHP7 default value = Off).
; Turning this parameter off will not display errors on PHP startup, even if display_errors = On.
; It is recommended to turn off this feature on production servers to avoid leaking sensitive configuration information.

log_errors = Off
; Whether to log error information to the destination specified by error_log.
; It is strongly recommended that you use logging errors instead of direct output in a production environment.
; This lets you know what went wrong without exposing sensitive information.
; Default value for FPM/FastCGI mode = On

log_errors_max_len = 1024
; Maximum length in bytes allowed for error messages. Setting this to 0 allows unlimited length.

ignore_repeated_errors = Off
; Whether to ignore repeated error messages.
; Error messages must appear on the same line in the same script to be considered repeated (unless ignore_repeated_source = On).

ignore_repeated_source = Off
; When ignore_repeated_errors = On, whether to ignore the source of the error message (ignore the same error message from different codes).

report_memleaks = On
; Whether to report memory leaks. This parameter only works in PHP compiled in debug mode.
; and must include E_WARNING in the error_reporting directive

report_zend_debug = Off
; No documentation yet (PHP7 Apache/FPM/FastCGI mode default = On)

html_errors = On
; Whether to use HTML tags in error messages.
; Do not use this feature when error logging is required!
; [Tip] For CLI mode, this command is hardcoded to Off

xmlrpc_errors = Off
; Whether to set the error report format to XML-RPC error message format (turn off normal error reporting).

xmlrpc_error_number = 0
; The value of the XML-RPC faultCode element (only meaningful when xmlrpc_errors = On).

docref_root = ;"https://www.php.net/manual/zh/"
docref_ext = ;".php"
; If html_errors = On and docref_root is set, PHP will display hyperlinks in error messages.
; Direct link to a page describing the error or function that caused the error.
; After you download the PHP manual, you can point the docref_root directive to the URL directory where your local manual is located.
; You must also set the docref_ext directive to specify the file extension (must contain '.').
; [Note] Do not use this feature on a production server.

error_prepend_string = ;""
error_append_string = ;"
"
; Strings appended before and after the error message (generally used to add color)

error_log =
; Set the destination for error logging. If it is a file (recommended), it must have write permission.
; Set to syslog to log to the system log (event log under NT, syslog(3) under Unix)
; Setting it to empty means: Apache error log (apache2handler), standard error (CLI), no logging (FPM).
; Default value for FPM/FastCGI mode="/var/log/php-fpm/www-error.log"(RHEL/CentOS)

syslog.facility = LOG_USER
; The facility field value in the system log (the subsystem that generates the log).
; Only meaningful when error_log = syslog.

syslog.filter = no-ctrl
; Filter (escape as "\x???") unsafe characters in log messages:
; ascii (only ASCII characters and NL characters are allowed)
; no-ctrl (allow all non-control characters)
; all (all characters are allowed)
; raw (allow all characters, but do not split log messages on newlines)
; Only meaningful when error_log = syslog.

syslog.ident = php
; The ident field value in the system log (log message prefix [identification string]).
; Only meaningful when error_log = syslog.

[FileStream]

allow_url_fopen = On
; Is it allowed to use URLs (such as http:// or ftp://) as a file.

allow_url_include = Off
; Whether to allow include/require URLs (such as http:// or ftp://).

user_agent =
; The "User-Agent" string used by PHP when accessing the URL

default_socket_timeout = 60
; Default timeout in seconds for socket streams

from =
; Define the password for anonymous ftp (an email address)

auto_detect_line_endings = Off
; Whether to let PHP automatically detect the end of line (EOL).
; If your script must process Macintosh files, or you run on a Macintosh and have to process unix or win32 files,
; Turning on this directive allows PHP to automatically detect EOL so that fgets() and file() functions can work properly.
; But it will also cause incompatible behavior for people who use carriage return (CR) as item separator under Unix systems.
; Additionally, there is a small performance penalty for detecting the EOL convention on the first line.

[Filter]
;extension=filter
; Confirm and filter data from unreliable sources.

filter.default = unsafe_raw
; Use the specified filter to filter $_GET, $_POST, $_COOKIE, $_REQUEST, $_SERVER data ( unsafe_raw means no filtering).
; The raw data can be accessed via the filter_input() function.

filter.default_flags =
; Default filter flag.

[OptionsInfo]

assert.active = On
; Whether to enable assert() assertion evaluation.

assert.bail = Off
; Whether to abort script execution when a failed assertion occurs

assert.warning = On
; Whether to issue a warning for each failed assertion

assert.callback =
; Callback function executed when a failed assertion occurs

assert.exception = On
; Whether to throw an AssertionError exception when the assertion fails
; PHP7 default value = Off

enable_dl = On
; Whether to allow the use of the dl() function. The dl() function is only valid when PHP is installed as an apache module.
; Disabling the dl() function is mainly for security reasons, as it can bypass the restrictions of the open_basedir directive.
; This feature will definitely be removed in the future. It is strongly recommended to set it to Off.

max_execution_time = 30
The maximum execution time (in seconds) allowed for each script. 0 means no limit.
; This parameter helps prevent low-quality scripts from endlessly occupying server resources.
; This directive only affects the running time of the script itself. Any other time spent outside the script running,
; For example, system()/sleep() functions, database queries, file uploads, etc. are not included.
; [Tip] For CLI mode, this command is hardcoded to "0" (no limit)
; [Tip] Do not set this directive to be greater than Apache's Timeout directive (it may interrupt PHP execution prematurely).

max_input_time = -1
The maximum allowed time (in seconds) for each script to receive input data (POST, GET, upload).
-1 means unlimited. On a production server this should be limited to an explicit value to prevent the script from running indefinitely.
; If the user has a slow connection and needs to upload large files, a larger value should be set.
; [Tip] For CLI mode, this command is hardcoded to "-1" (no limit)

max_input_nesting_level = 64
; Maximum nesting depth of input variables ($_GET, $_POST, $_COOKIE ...)

max_input_vars = 1000
; Maximum total number of members of input variables ($_GET, $_POST, $_COOKIE ...).
; This directive mitigates the possibility of denial of service attacks via hash collisions
; Input variables exceeding the limit will be truncated and cause E_WARNING to be generated.

zend.enable_gc = On
; Whether to enable the circular reference counter collector (garbage collection). Turning off this directive may cause memory leaks.

[Mail]

mail.add_x_header = Off
; Whether to add X-PHP-Originating-Script: header to include "script UID + file name" information

mail.force_extra_parameters =
; Force the fifth parameter of the mail() function to be specified.

mail.log =
; How to log calls to the mail() function. Set to empty to not log.
; It can be set to a file path to indicate recording to a file, or it can be set to syslog to indicate recording to the system log.

SMTP = "localhost"
; The host name or IP address of the SMTP server used by the mail() function to send emails (Windows only).

smtp_port = 25
; Port number of the SMTP server (Windows only).

sendmail_from =
; Email address in the "From:" header when sending mail (win32 only).
; This option also sets the "Return-Path:" header.

sendmail_path = /path/to/sendmail
; Path to the sendmail program (including command line arguments).
; The configure script will try to find this program and set it to the default value (usually "/usr/sbin/sendmail -t -i"), but if that fails, you can set it manually here.
; Systems that do not use sendmail should set this directive to the sendmail replacement program (if any).
; The default value of this directive on Windows platforms is empty.
; If this directive is set on Windows platforms, the smtp smtp_port sendmail_from directives are ignored and the command specified here is run.

[Misc]

ignore_user_abort = Off
; Whether to complete the entire request even if the user aborts it.
; It is recommended to set this to On, as long requests may cause users to abort or browser timeout.

highlight.comment = "#FF8000"
highlight.default = "#0000BB"
highlight.html = "#000000"
highlight.keyword = "#007700"
highlight.string = "#DD0000"
; Color for syntax highlighting mode (usually used to display .phps files).
; As long as it can be Accept it and it will work normally.

browscap = ;"c:/windows/system32/inetsrv/browscap.ini"
; The location and file name of the browser function file (this setting is only required for PWS and IIS).

[OutputControl]

output_buffering = 0
; Output buffer size (bytes). The recommended value is 4096 [can also be controlled by ob_start() function].
; Output buffering allows you to send HTTP headers (including cookies) even after outputting the body content.
; Setting output buffering can sometimes reduce the number of network packets sent (improve network performance).
; The actual benefit of this parameter depends a lot on what web server and what kind of scripts you use.
; [TIP] For CLI mode, this command is hardcoded to "0" (disable output buffering)

output_handler =
; Redirect all script output to an output handler function.
; For example, when set to "mb_output_handler" to redirect to the mb_output_handler() function, the character encoding will be transparently converted to the specified encoding.
; Once an output handler is specified here, output buffering will be automatically turned on (buffer size = unlimited).
; Note 0: Only PHP built-in functions can be used here. Custom functions should be specified in the script using the ob_start() function.
; Note 1: Portable scripts should not rely on this directive, but should use the ob_start() function to explicitly specify the output processing function.
; Do not use this command lightly, otherwise it may cause errors in some scripts that you are not familiar with.
; Note 2: The two output processing functions "mb_output_handler" and "ob_iconv_handler" cannot be used at the same time.
; The "ob_gzhandler" output processing function and the "zlib.output_compression" directive cannot be used at the same time.
; NOTE 3: If "zlib.output_compression = On", then this directive must be empty (use "zlib.output_handler" instead).

implicit_flush = Off
; Whether to require the PHP output layer to automatically flush data after each output block.
; This is equivalent to automatically calling the flush() function after each print(), echo(), HTML block.
; Turning on this option will have a serious impact on the performance of program execution and is only recommended for debugging.
; [Tip] For CLI mode, this command is hardcoded to "On" (force automatic flash)

[PCRE]

pcre.backtrack_limit = 1000000
; Maximum backtracking depth.

pcre.recursion_limit = 100000
; Maximum recursion depth. If you set this value too high, you may run out of process stack space and cause PHP to crash.

pcre.jit = 1
; Whether to enable JIT (just-in-time) compilation of the PCRE library.

[Phar]
;extension=phar
; Package PHP applications/libraries to simplify deployment (read-only for others to use)

phar.readonly = On
; Whether to enable Phar read-only mode. Be sure to enable this command in a production environment, otherwise it will leave a huge security vulnerability.

phar.require_hash = On
; Whether to verify the signature of all Phar archives (to prevent archive contents from being tampered with). It is recommended to enable it to enhance security.

phar.cache_list =
; List of Phar archives to preparse during server startup (for improved performance).

[Session]

session.save_handler = files
; The name of the storage handler to store and retrieve session data. Defaults to files ("files").
; Setting it to "user" means that you can use session_set_save_handler() to register a custom storage handler.
; Extension modules can register new storage handlers. All registered storage handlers can be viewed via phpinfo().

session.save_path =
; Parameters passed to save_handler. For the files handler, this is the directory where session data files are stored (the default is the system temporary directory).
; You can use the "N;[MODE;]/path" mode to define the directory, where the optional [MODE;] is the data file access permission expressed in octal (the default is "600").
; The integer N means using N-level deep subdirectories (instead of saving all data files in the same directory) to improve performance for a large number of sessions.
; Note: (1) The double quotes around "N;[MODE;]/path" cannot be omitted (because ";" is a comment character). (2) [MODE;] does not rewrite the umask of the process.
; (3) PHP will not automatically create these directory structures (you can use the mod_files.sh script in the ext/session directory).
; (4) If the directory (such as "/tmp") can be read or retrieved by unsafe users, it will lead to security vulnerabilities (leakage of session ID or even session data).
; (5) When N>0, automatic garbage collection will fail (see session.gc_* instructions for details).
; (6) Setting N>2 (each layer has 64 subdirectories, and N=3 means creating 64*64*64 subdirectories) may be necessary only when you have a huge number of sessions.
; (7) It is recommended to set up different session storage directories for each different virtual host.
; Default value for FPM/FastCGI mode="/var/lib/php/session"(RHEL/CentOS)

session.name = PHPSESSID
; The session ID used in the cookie can only contain letters and numbers.

session.auto_start = Off
; Whether to automatically initialize the session engine when a client visits any page.
; Because class definitions must be loaded before the session is started, objects cannot be stored in the session when this option is turned on.

session.serialize_handler = php
; Processor used to serialize/deserialize data, you can use "php", "php_binary", "php_serialize".
; It is recommended to use the new "php_serialize" instead of the default old "php" to avoid certain limitations and defects.
; [NOTE] Once WDDX support is enabled, only "wddx" will be used.

session.gc_probability = 1
session.gc_divisor = 100
; Defines the probability of starting the garbage collector each time a session is initialized.
; The collection probability is calculated as follows: session.gc_probability/session.gc_divisor
; The more frequent the session page is accessed, the smaller the probability should be. It is recommended to set it to 1/(1000~5000).

session.gc_maxlifetime = 1440
; After the number of seconds specified by this directive, the saved data will be considered 'garbage' and cleaned up by the garbage collector.
; The judgment criterion is the time when the data was last accessed (for the FAT file system, it is the time when the data was last refreshed).
; If multiple scripts share the same session.save_path directory but have different session.gc_maxlifetime,
; then the minimum value of all session.gc_maxlifetime directives will be used.
; If you use multiple levels of subdirectories to store data files, the garbage collector will not start automatically.
; You must use a custom script, cron job, or other method to perform garbage collection.
; For example, the following script is equivalent to setting "session.gc_maxlifetime=1440" (24 minutes):
; cd /path/to/sessions; find -cmin +24 | xargs rm

session.referer_check =
; If the "Referer:" field in the request header does not contain the string specified here, the session ID will be considered invalid.
; NOTE: If the "Referer:" field is not present at all in the request header, the session ID will still be considered valid.
; The default is empty, which means no check is performed (all are considered valid).

session.use_strict_mode = 0
; Whether to use strict session ID mode (reject uninitialized session IDs). Enabling strict mode can protect the server from session fixation attacks.
; "Strict mode" means that if the browser sends an uninitialized session ID, the server will respond with a new initialized session ID.
; The default value "0" means disabling strict mode. It is recommended to set it to "1" to enable this feature.

session.use_cookies = 1
; Whether to use cookies to save session IDs on the client side ("1" to enable, "0" to disable).

session.use_only_cookies = 1
; Whether to use only cookies to save session IDs on the client side ("1" to enable, "0" to disable).
; Enabling this feature can avoid security issues caused by passing session IDs in URLs.
; It is recommended to enable this option to enhance security.

session.cookie_lifetime = 0
; The validity period (in seconds) of the cookie that passes the session ID. "0" means it is only valid while the browser is open.
; [Tip] If you cannot ensure that the server time and the client time are strictly consistent, please do not change this default value!

session.cookie_path = /
; Cookie path for passing session ID.

session.cookie_domain =
; Scope (domain name) of the cookie that passes the session ID.
; The default value of empty means the host name is generated according to the cookie specification.

session.cookie_secure = 0
; Whether to send cookies only over secure connections (https) ("1" to enable, "0" to disable).

session.cookie_httponly = 0
; Whether to add the httpOnly flag (allow only HTTP protocol access) to the cookie ("1" means enabled, "0" means disabled).
; Enabling this feature will prevent client scripts (JavaScript, etc.) from accessing the cookie.
; Turning on this directive can effectively prevent session ID hijacking through XSS attacks.

session.cookie_samesite =
; Add the value of the SameSite attribute to the cookie (one of "Strict", "Lax", "None" [be sure to keep the quotes]),
; Allows the server to declare to the client that this cookie should not be used for cross-site requests, which helps prevent Cross-Site Request Forgery.
; Not all browsers support this feature. Setting this to empty means that the SameSite attribute will not be sent with the cookie.
; "Strict" means that both POST and GET are prohibited from sending cookies across sites
; "Lax" means prohibiting POST from sending cookies across sites, but allowing GET to send cookies across sites
; See https://tools.ietf.org/html/draft-west-first-party-cookies-07

session.cache_limiter = nocache
; Specify cache control policy for session pages (nocache|private|private_no_expire|public).
; nocache means disabling client and proxy server caching; public means allowing client and proxy server caching;
; private means that client caching is allowed but proxy server caching is prohibited;
; private_no_expire is the same as private, but does not send the "Expire:" response header (to solve the BUG that browsers such as Mozilla may not handle the Expire response header correctly).
; Setting it to empty means not sending any response header related to cache policy. See the session_cache_limiter() function for details.

session.cache_expire = 180
; Specifies the expiration time (in minutes) of session pages in the client cache. This setting is meaningless when session.cache_limiter = nocache.

session.use_trans_sid = 0
; Whether to display the SID (session ID) in the URL in plain text ("1" means enabled, "0" means disabled).
; URL-based session management is always more risky than cookie-based session management and should be disabled.

session.trans_sid_tags = "a=href,area=href,frame=src,form="
; Specify which HTML tags to rewrite to include the SID (only meaningful when session.use_trans_sid = On).
;

The tag is special. If you include it, the URL Rewriter will add a hidden Fields,
; It contains additional information that should be appended to the URL ().
; The URL in the tag's action attribute is not modified (unless an action attribute is explicitly specified).
; Note: All legal items require an equal sign (even if there is no value after it).

session.trans_sid_hosts =
; By default, absolute URLs are not rewritten. You must use ini_set() to specify the target domain name at runtime to rewrite absolute URLs.
; Tags are special. PHP will ignore the session.trans_sid_tags directive when checking the URL of the action attribute.
; If no domain name is specified, $_SERVER['HTTP_HOST'] will be used as the allowed domain name.
; You can use commas to separate a group of domain names, for example: php.net,www.php.net,wiki.php.net (do not include spaces)

session.sid_length = 32
; The length of the session ID string (22~256). It is recommended to use a minimum length of 32 characters (the longer the better).

session.sid_bits_per_character = 4
; Define how many hash bits each character in the session ID contains (the larger the number, the more secure it is). Value range:
; 4 (4 bits: 0-9, af)
; 5 (5 bits: 0-9, av) (recommended value)
; 6 (6 bits: 0-9, az, AZ, "-", ",")

url_rewriter.tags = "form="
; Target tag for real-time URL rewriting (requires output_buffering support to be enabled).
; [Note] The session functionality of this directive has been replaced by the session.trans_sid_tags directive.

url_rewriter.hosts =
; Target host for real-time URL rewriting (requires output_buffering support).
; Although this instruction belongs to the core part of PHP, it is used for the configuration of the Session module.
; See the session.trans_sid_hosts directive for details.

session.upload_progress.enabled = On
; Whether to use the $_SESSION array to track upload progress.

session.upload_progress.cleanup = On
; Whether to clear the upload progress information immediately after reading all POST data (after uploading is completed).
; It is strongly recommended to keep the default value On

session.upload_progress.prefix = upload_progress_
; Key name prefix in the $_SESSION array used to track upload progress.
; This prefix will be concatenated with $_POST[ini_get("session.upload_progress.name")] to form the key name.

session.upload_progress.name = PHP_SESSION_UPLOAD_PROGRESS
; Key name suffix in the $_SESSION array used to track upload progress.
; If $_POST[ini_get("session.upload_progress.name")] does not exist, upload progress will not be tracked.

session.upload_progress.freq = "1%"
; The step size at which to update the upload progress. It can be set as a percentage or number of bytes.

session.upload_progress.min_freq = 1
; Minimum time interval (in seconds) for updating upload progress.

session.lazy_write = On
; Whether to write session data to disk only when it changes.

[Tokenizer]
;extension=tokenizer
; PHP source code parser

[Variable]

unserialize_callback_func =
; If the deserializer needs to instantiate an undefined class,
; The specified callback function will be called by unserialize() with the name of the undefined class as a parameter,
; to avoid getting an incomplete "__PHP_Incomplete_Class" object.
; If no callback function is specified, or the specified callback function does not contain (or implement) the undefined class, a warning message will be displayed.
; So only set this directive if you really need to implement such a callback function.
; To disable this feature, just leave it blank.

unserialize_max_depth = 4096
; Default maximum depth limit for unserialized structures. Setting it too deep may cause stack overflow during deserialization.
; Set to 0 for no depth limit. This setting can be overridden by the max_depth parameter when calling unserialize().

;;;;;;;;;;;;;;;;;;;;;
;; Binding extension;;
;;;;;;;;;;;;;;;;;;;;;

;extension=bcmath
; Arbitrary precision math

;extension=calendar
; Convert between different calendars

;extension=ctype
; Efficiently detect whether a string contains only characters of a specified type

;extension=mbstring
; Process multibyte strings

;extension=exif
; Read metadata from image files
; The exif module depends on the mbstring module and must be loaded after the mbstring module.

;extension=fileinfo
; Guess the file's content type and encoding

;extension=ftp
; FTP client

;extension=iconv
; Character set conversion

;extension=gd
; Image processing

;extension=intl
; Internationalization and localization

;extension=shmop
; Manipulate Unix shared memory

;extension=sockets
; Network sockets

;extension=sqlite3
; SQLite v3 database

;extension=zlib
; gzip compression and decompression

;zend_extension=opcache
; Store precompiled bytecode in shared memory to improve performance (save the overhead of loading and parsing PHP scripts each time)

[BCMath]

bcmath.scale = 0
; Default value of the scale parameter (number of decimal places) to be used for all bcmath functions.

[Exif]

exif.encode_unicode = ISO-8859-15
; Encoding UNICODE Character encoding to use for user comments. The default value ISO-8859-15 is only usable in most non-Asian countries.
; When the mbstring module is enabled, you can set it to a character encoding supported by mbstring,
; It can also be set to empty to use the value of the mbstring.internal_encoding directive.

exif.decode_unicode_intel = UCS-2LE
exif.decode_unicode_motorola = UCS-2BE
; Set the character encoding used to decode UNICODE user comments according to little endian (intel)/big endian (motorola) respectively.
; When the mbstring module is enabled, this can be set to a list of character encodings supported by mbstring. Cannot be set to empty.

exif.encode_jis =
; Encoding Character encoding used for JIS user comments.
; The default is empty, which means using the value of the mbstring.internal_encoding directive.

exif.decode_jis_intel = JIS
exif.decode_jis_motorola = JIS
; Set the character encoding used to decode JIS user comments according to little endian (intel)/big endian (motorola) respectively.
; When the mbstring module is enabled, this can be set to a list of character encodings supported by mbstring. Cannot be set to empty.

[iconv]

iconv.input_encoding =
; Deprecated this directive (deprecated in PHP 5.6.0) (use the input_encoding directive instead)

iconv.output_encoding =
; Deprecated this directive (deprecated in PHP 5.6.0) (use output_encoding directive instead)

iconv.internal_encoding =
; Deprecated this directive (deprecated in PHP 5.6.0) (use the internal_encoding directive instead)

[GD]

gd.jpeg_ignore_warning = 1
; Whether to ignore the warning message of jpeg decoder (such as unable to recognize the image format) ("1" means enable, "0" means disable).

[intl]

intl.default_locale =
; Default ICU locale value (not the operating system locale) for intl functions (methods).
; The default value is empty, which means using the default locale value of ICU.
; Because once this directive is set in php.ini, it cannot be reset to the default value, so it is recommended to keep the default empty value and not set it explicitly.

intl.error_level = 0
; intl The error message level of the function (method). The value range is consistent with the error_reporting directive (for example, E_WARNING).
; The default value 0 means to disable all error messages. This directive does not affect the return value of the intl function.
; Selecting E_ERROR will cause the entire script to be terminated when an error occurs in the intl function (method).

intl.use_exceptions = Off
; Whether to throw an IntlException when an error occurs in an intl function (method).
; This feature can coexist with intl.error_level.

[mbstring]

mbstring.language = neutral
; The default NLS (local language setting), the default value "neutral" (UTF-8) means neutral, equivalent to Unicode (including all languages).
; It is recommended not to modify this setting (unless you do not want to use UTF-8 as the internal encoding).
; This directive must be placed before the mbstring.internal_encoding directive.

mbstring.encoding_translation = Off
; Whether to perform transparent encoding conversion on incoming HTTP requests,
; That is, automatically detect the encoding of the input characters and convert them transparently to the internal encoding (default_charset).
; Portable libraries or programs should never rely on automatic encoding conversion.

mbstring.http_input =
mbstring.http_output =
mbstring.internal_encoding =
; Deprecated these directives (deprecated in PHP 5.6.0) (use the default_charset directive instead)

mbstring.detect_order =
; The default detection order for character encodings, accepts a comma-separated list of character encodings.
; The default value depends on the value of the mbstring.language directive (mostly a list starting with "ASCII,UTF-8").
; Set to "pass" to not perform any character encoding conversion.
; For an environment where simplified Chinese is the main language, it can be set to "ASCII,UTF-8,EUC-CN,CP936,GB18030".
; See mb_detect_order() function.

mbstring.substitute_character =
; Define replacement characters for characters with invalid encoding.
; Set to an integer to replace the Unicode character corresponding to the integer, set to empty to directly delete the invalid encoded characters,
; Set to a string to replace with the string. It is recommended to set it to 9633 (tofu block character "□").

mbstring.http_output_conv_mimetypes = "^(text/|application/xhtml\+xml)"
; No documentation yet

mbstring.strict_detection = Off
; Whether to use strict encoding detection (because the browser may submit the form in a different character encoding than the page).
; Although the browser can reasonably guess the character encoding based on the HTML page, it is better to explicitly set the default_charset directive.
; See mb_http_input() function (detect the character encoding used by the browser).

mbstring.regex_retry_limit = 1000000
mbstring.regex_stack_limit = 100000
; No documentation yet

[OPcache]

opcache.enable = On
; Whether to enable opcode cache.
; This feature can only be disabled via the ini_set() function, not enabled via the ini_set() function.

opcache.enable_cli = Off
; Whether to enable opcode caching for the CLI version. For debugging purposes only.

opcache.memory_consumption = 128
; The maximum amount of shared memory OPcache is allowed to occupy (in megabytes [MB]). Must be set to an integer greater than or equal to 8.

opcache.interned_strings_buffer = 8
; The memory size (in megabytes [MB]) used to store reserved strings. Must be set to a positive integer.

opcache.max_accelerated_files = 10000
; The maximum number of files allowed to be cached in the OPcache hash table (value range = 200~1000000).
; The actual value range is in the prime number set {223,463,983,1979,3907,7963,16229,32531,65407,130987,262237,524521,1048793}
; The first prime number found in the range that is greater than or equal to the set value. Values outside this range will be automatically corrected to the allowed range.

opcache.max_wasted_percentage = 5
; The maximum allowed percentage of wasted memory (value range = 1~50). Once this limit is reached, OPcache will be reset.

opcache.use_cwd = On
; On means using "script file name + script working directory" as the key of the OPcache hash table.
; Off means only "script file name" is used as the key of OPcache hash table.
; Setting this to On can avoid conflicts between scripts with the same name (safer).
; Setting this to Off can improve OPcache performance (may cause the application to crash).

opcache.validate_timestamps = On
; Whether to check for script updates every opcache.revalidate_freq seconds.
; If this option is disabled, then OPcache must be reset manually using the opcache_reset() or opcache_invalidate() functions,
; Or restart the service to make the file system changes take effect.

opcache.revalidate_freq = 2
; The number of seconds between checking for script updates. Setting this to 0 means checking on every request.
; Only meaningful when opcache.validate_timestamps = On.

opcache.revalidate_path = Off
; Whether to check the script path in include_path.
; Setting it to Off means reusing cached files in include_path (files with the same name outside include_path cannot be found).

opcache.save_comments = On
; Whether to cache comments in scripts (discarding comments can reduce cache usage).
; Setting this to Off may cause some applications or frameworks that rely on annotations to not work properly (e.g. Doctrine, Zend Framework 2, PHPUnit).

opcache.enable_file_override = Off
; Whether to use OPcache to check file status (such as file_exists(), is_file(), is_readable() ...) first.
; Setting it to On can increase the checking speed, but may return old expired data when opcache.validate_timestamps = Off.

opcache.optimization_level = 0x7FFEBFFF
; Bitmask controlling OPcache optimization level.

opcache.dups_fix = Off
; Only used to resolve "Cannot redeclare class" errors.

opcache.blacklist_filename =
; OPcache blacklist (absolute path). The blacklist is a plain text file.
; Each line is an absolute path (can contain wildcards or just a path prefix),
; Disables caching of files matching this path. Lines starting with a semicolon (;) are treated as comments and ignored.
; Here is a simple blacklist example:
; ;Match a specific file
; /var/www/broken.php
; ;Match all files starting with x in the /var/www/ directory
; /var/www/x
; ;Wildcard matching
; /var/www/*-broken.php

opcache.max_file_size = 0
; Maximum file size allowed to be cached (in bytes). "0" means no limit.

opcache.consistency_checks = 0
; How often to check the cache checksum. "0" means no check.
; Because it has a significant impact on performance, it should only be used for debugging purposes and never on production servers.

opcache.force_restart_timeout = 180
; OPcache will be restarted after being idle for a certain number of seconds (long idle time means OPcache may be faulty).
; If opcache.log_verbosity_level ≥ 2, a warning message will be logged when a restart occurs.

opcache.error_log =
; Destination for OPcache error logging (usually a file path).
; Setting it to empty is equivalent to "stderr" (usually means logging to the web server's error log).

opcache.log_verbosity_level = 1
; OPcache log level: (0) fatal (1) error (2) warning (3) information (4) debug

opcache.preferred_memory_model =
; OPcache's preferred memory model. It is recommended to leave it empty (auto-select).
; Value range: mmap, shm, posix, win32

opcache.protect_memory = Off
; Whether to protect shared memory (to avoid unexpected writes when executing scripts). Only used for internal debugging.

opcache.mmap_base =
; Base address of the shared memory segment (Windows only). All PHP processes map shared memory to the same address space.
; This command is used to manually correct the "Unable to reattach to base address" error.

opcache.restrict_api =
; Only allow PHP scripts in the specified path to call OPcache API functions. Setting this to empty means no restriction.

opcache.file_update_protection = 2
; Disable caching of files that have been modified within the last few seconds (2 seconds by default) to avoid caching incomplete files (which may not have been completely flushed to disk).
; If the file system itself can ensure that file updates are atomic operations, then it can be set to 0 to improve site performance.

opcache.huge_code_pages = Off
; Whether to copy PHP code (text segment) to the huge page (HUGE PAGE).
; Using large pages can improve performance, but this requires support from the CPU and operating system kernel as well as additional system configuration.

opcache.lockfile_path = /tmp
; Absolute path to store shared lock file (Unix platforms only).

opcache.opt_debug_level = 0
; Dump the generated opcodes for debugging different stages of optimization. "0" means no dump.
; Setting it to 0x10000 means outputting the opcode before optimization, and setting it to 0x20000 means outputting the opcode after optimization.

opcache.file_cache =
; Set the secondary cache directory based on the disk file system. Setting it to empty means disabling the secondary cache.
; Enabling the second-level cache can improve performance when shared memory is full, the server is restarted, or the shared memory is reset.

opcache.file_cache_only = Off
; Whether to use only the disk file system based secondary cache (not using shared memory).

opcache.file_cache_consistency_checks = On
; Whether to check the file's checksum when loading scripts from the disk file system based second level cache.

opcache.file_cache_fallback = On
; Whether to try to use a disk file system based secondary cache when the process cannot attach to shared memory (equivalent to implicitly turning on opcache.file_cache_only).
; Only makes sense if opcache.file_cache = is set.
; Note: (1) Applies only to Windows platforms; (2) Disabling it may cause the process to fail to start.

opcache.validate_permission = Off
; Whether to verify the current user's access rights to cache files.

opcache.validate_root = Off
; Whether to check for name conflicts in the chroot environment.
; This option should be enabled in a chroot environment to prevent processes from accessing files outside the chroot environment.

opcache.preload =
; Specify the PHP script that is precompiled and cached when the service starts (other files can be further preloaded in the script through include or opcache_compile_file()).
; All included functions, classes and other entities will be loaded and cached when the service starts (available out of the box).
; This feature is not supported on Windows platforms.

opcache.preload_user =
; The username that performs the preloading operation (for security reasons, it is forbidden to preload code as the root user).
; These preloaded codes can also only run as this user.

opcache.record_warnings = Off
; On means that compiler warnings will be recorded and replayed each time the script is included.
; Off means compiler warnings will only be issued the first time a script is cached.

opcache.cache_id =
; Specify an ID value for this OPcache instance (only available on Windows platforms).
; All PHP processes with the same OPcache ID and username share the same OPcache instance.
; The purpose of this directive is to allow the same user to use multiple OPcache instances.

opcache.jit = tracing
opcache.jit_bisect_limit = 0
opcache.jit_blacklist_root_trace = 16
opcache.jit_blacklist_side_trace = 8
opcache.jit_buffer_size = 0
opcache.jit_debug = 0
opcache.jit_hot_func = 127
opcache.jit_hot_loop = 64
opcache.jit_hot_return = 8
opcache.jit_hot_side_exit = 8
opcache.jit_max_exit_counters = 8192
opcache.jit_max_loops_unroll = 8
opcache.jit_max_polymorphic_calls = 2
opcache.jit_max_recursive_calls = 2
opcache.jit_max_recursive_returns = 2
opcache.jit_max_root_traces = 1024
opcache.jit_max_side_traces = 128
opcache.jit_prof_threshold = 0.005
; No documentation yet (new in PHP8)

[SQLite3]

sqlite3.extension_dir =
; Directory where SQLite extensions are stored.

sqlite3.defensive = On
; On means disabling the SQL language functions that can damage the database file (forbid direct writing to the schema, shadow, and sqlite_dbpage tables).

[Zlib]

zlib.output_compression = 0
; Compression buffer size for compression script output ("0" means turning this feature off).
; When the browser sends the "Accept-Encoding: gzip(deflate)" request header,
; "Content-Encoding: gzip(deflate)" and "Vary: Accept-Encoding" headers will be added to the response header. For better compression,
; A larger compression buffer should be specified and the output_buffering buffer should be enabled (the optimal value should be slightly larger than the compressed result size of the compression buffer).
; If zlib output compression is enabled, then zlib.output_handler must be used instead of the output_handler directive (which must be set to empty).

zlib.output_compression_level = -1
; Compression level, available values are 0~9, 0 means no compression, the higher the value, the better the effect, but the more CPU is occupied.
; The default value -1 means using zlib's internal default value (6).

zlib.output_handler =
; Output processor for use with the zlib.output_compression directive.
; Available handlers are "zlib.inflate" (decompression) or "zlib.deflate" (compression).
; If this directive is enabled the output_handler directive must be set to empty.

;;;;;;;;;;;;;;;;;;;;;
;; External extension;;
;;;;;;;;;;;;;;;;;;;;;

;extension=bz2
; Bzip2 compression and decompression

;extension=curl
; http, ftp, telnet, ldap clients

;extension=dom
; Manipulate XML documents through DOM (Document Object Model) API

;extension=gettext
; Internationalize PHP programs through NLS (Native Language Support) API

;extension=imap
; Mail client (IMAP, POP3)

;extension=ldap
; LDAP(Lightweight Directory Access Protocol) client

;extension=mysqlnd
;extension=mysqli
; MySQL client (load mysqlnd first and then mysqli)

;extension=openssl
; OpenSSL (encryption, decryption, signature, certificate)

;extension=pgsql
; PostgreSQL client

;extension=simplexml
; A simple and easy-to-use XML toolset

;extension=snmp
; Simple Network Management Protocol

;extension=soap
; Simple Object Access Protocol

;extension=xml
; XML parser

;extension=xmlreader
;extension=xmlwriter
; XML reading and writing

;extension=zip
; ZIP compression and decompression

[cURL]

curl.cainfo =
; A default value for the CURLOPT_CAINFO option. Must be an absolute path.

[IMAP]

imap.enable_insecure_rsh = Off
; Whether to enable rsh/ssh login support. Enabling this option will bring security risks.

[LDAP]

ldap.max_links = -1
; Maximum number of open connections per process. -1 means unlimited.

[MySQLnd]

mysqlnd.collect_statistics = On
; Whether to collect various client statistics (can be used for tuning or monitoring).
; These statistics can be accessed via mysqli_get_client_stats(), mysqli_get_connection_stats(), mysqli_get_cache_stats().
; These statistics can also be viewed on the phpinfo() page.
; Whether to collect statistics related to memory usage is controlled by the mysqlnd.collect_memory_statistics directive.

mysqlnd.collect_memory_statistics = Off
; Whether to collect client statistics related to memory usage (can be used for tuning or monitoring).
; These statistics can be accessed via mysqli_get_client_stats(), mysqli_get_connection_stats(), mysqli_get_cache_stats().
; These statistics can also be viewed on the phpinfo() page.

mysqlnd.debug =
; This directive only makes sense when PHP is compiled in debug mode.

mysqlnd.log_mask = 0
; Indicates which SQL queries are recorded. Must be the sum of the following numbers indicating query categories ("0" means no recording):
; SERVER_STATUS_IN_TRANS=1, SERVER_STATUS_AUTOCOMMIT=2, SERVER_MORE_RESULTS_EXISTS=8, SERVER_QUERY_NO_GOOD_INDEX_USED=16,
; SERVER_QUERY_NO_INDEX_USED=32, SERVER_STATUS_CURSOR_EXISTS=64, SERVER_STATUS_LAST_ROW_SENT=128,
; SERVER_STATUS_DB_DROPPED=256, SERVER_STATUS_NO_BACKSLASH_ESCAPES=512, SERVER_QUERY_WAS_SLOW=1024

mysqlnd.mempool_default_size = 16000
; Default memory pool size (bytes) for storing result sets.

mysqlnd.net_read_timeout = 86400
; Do not change the default value of this directive without full understanding.

mysqlnd.net_cmd_buffer_size = 4096
; Size (in bytes) of the command buffer to pre-allocate for each connection. Must be set to a value no less than 4096.
; It is recommended to set it to a larger value (such as 8192 or 16384 or 32768) to improve performance.

mysqlnd.net_read_buffer_size = 32768
; The size (in bytes) of the read buffer to preallocate for each connection. Must be set to a value no less than 32768.
; It is recommended to set it to a larger value (such as 65536 or 131072 or 262144) to improve performance.

mysqlnd.sha256_server_public_key =
; MySQL server RSA public key file for use with the SHA-256 authentication plugin.
; After setting this instruction, the client no longer needs to set the RSA public key of the MySQL server.
; Otherwise the client must set the MySQL server's RSA public key at runtime using mysqli_options().
; If the client does not specify any RSA public key, the server RSA public key received by the SHA-256 authentication plug-in will be used directly (without validity verification).

mysqlnd.trace_alloc =
; No documentation yet

mysqlnd.fetch_data_copy = Off
; Whether to force copying of the result set from the internal result set buffer into a PHP variable (instead of using the default quoting and copy-on-write logic).
; Copying result sets (rather than having PHP variables apply to them) can free up memory previously allocated for PHP variables earlier (reducing memory usage), but will slow down execution.
; If using PDO_MySQL, do not enable this feature.

[MySQLi]

mysqli.allow_local_infile = Off
; Whether to allow the use of LOAD DATA statement to load local files (from PHP's perspective).

mysqli.allow_persistent = On
; Whether to allow the creation of persistent connections.

mysqli.max_persistent = -1
; Maximum number of persistent connections allowed. Set to -1 for unlimited.

mysqli.max_links = -1
; Maximum number of connections (persistent and non-persistent) allowed to be created. Set to -1 for unlimited.

mysqli.default_port = 3306
; The default TCP port number ($port) used to connect to the MySQL server. If no default value is specified here, it will be searched in the following order:
; (1) $MYSQL_TCP_PORT environment variable
; (2) mysql-tcp entry in the /etc/services file (unix)
; (3) The MYSQL_PORT constant specified at compile time
; NOTE: On Windows platforms only use the MYSQL_PORT constant.

mysqli.default_socket = /var/lib/mysql/mysql.sock
; The default socket ($socket) used when connecting to the local MySQL server.
; If not specified, the MySQL built-in default value is used.

mysqli.default_host =
; Default host name to use when connecting to the MySQL database ($host).

mysqli.default_user =
; The default username to use when connecting to the MySQL database ($username).

mysqli.default_pw =
; The default password ($passwd) used when connecting to the MySQL database. It is a bad idea to store passwords in configuration files.
; Not only can the program display the password through echo get_cfg_var("mysqli.default_pw"),
; and anyone with read access to the configuration file will also be able to see the password.

mysqli.reconnect = Off
; Whether to allow automatic reconnection when the connection is lost.

mysqli.rollback_on_cached_plink = Off
; On means that when a persistent connection is disconnected, all suspended transactions on this connection are first rolled back, and then the connection is put back into the permanent connection pool.
; Off means that the pending transaction will be rolled back only when the connection is reused or actually closed.
; Because libmysqlclient and streams have different understandings of MYSQL_OPT_READ_TIMEOUT,
; So users cannot set MYSQL_OPT_READ_TIMEOUT via API calls or runtime configuration.

[OpenSSL]

openssl.cafile =
; The path to the CA (certificate authority) file on the local file system, used to verify the validity of the peer SSL certificate.
; Setting it to empty means using the CA certificate managed by the operating system.

openssl.capath =
; Directory to store hashed CA (certificate authority) files.
; Only makes sense when openssl.cafile is empty or the specified CA file does not exist.
; Setting it to empty means using the CA certificate managed by the operating system.

[PostgresSQL]

pgsql.allow_persistent = On
; Whether to allow persistent connections

pgsql.max_persistent = -1
; Maximum number of persistent connections allowed per process. -1 means unlimited.

pgsql.max_links = -1
; Maximum number of connections (persistent and non-persistent) allowed per process. -1 means unlimited.

pgsql.auto_reset_persistent = Off
; Whether to automatically reset persistent connections that are terminated on pg_pconnect(). This requires some additional overhead to detect.

pgsql.ignore_notice = Off
; Whether to ignore warning messages from the PostgreSQL backend.
; Logging backend reminder messages requires some small additional overhead.

pgsql.log_notice = Off
; Whether to log PostgreSQL backend warning messages.
; Only meaningful when pgsql.ignore_notice = Off.

[SOAP]

soap.wsdl_cache_enabled = On
; Whether to enable WSDL cache

soap.wsdl_cache_dir = /tmp
; WSDL cache directory
; Default value for FPM/FastCGI mode="/var/lib/php/wsdlcache"(RHEL/CentOS)

soap.wsdl_cache_ttl = 86400
; WSDL cache validity period (seconds)

soap.wsdl_cache = 1
; WSDL cache type:
; WSDL_CACHE_NONE (0), WSDL_CACHE_DISK (1), WSDL_CACHE_MEMORY (2), WSDL_CACHE_BOTH (3)

soap.wsdl_cache_limit = 5
; WSDL memory cache limit (the maximum number of WSDL files allowed to be cached in memory).
; Once the limit is reached, the most recently cached file will push out the oldest cached file.

1/5 - (2 votes)

Leave a Reply

Your email address will not be published. Required fields are marked *