;;;;;;;;;;;;;;;;;
;; About php. ini;;
;;;;;;;;;;;;;;;;;
; This file must be named 'php. ini' and placed in the directory specified by the PHP INIDir directive in httpd.conf.
; The latest version of php. ini can be viewed in the following two places:
;;;;;;;;;;;;
;; Grammar;;
;;;;;;;;;;;;
; The syntax of this file is very simple. Blank characters and lines beginning with semicolons are simply ignored.
; chapter title (for example: [php]) are also simply ignored, even though they may have some meaning in the future.
;
The format of the setting command is as follows:
; directive = value
; The directive name is case sensitive! So "foo=bar" is different from "FOO=bar".
; value can be:
; 1. String defined with quotation marks (such as: "foo")
; 2. A number (integer or floating point number, such as 0, 1, 34, - 1, 33.55)
; 3. A PHP constant (such as: E_ALL, M_PI)
; 4. An INI constant (On, Off, none)
; 5. An expression (such as: E_ALL & ~E_NOTICE)
;
; The expressions in the INI file only use: bit operators, logical non, parentheses:
; | bit or
;&bit and
;~bit non
;! Logical Not
;
; Boolean flag indicates on and off.
;
; An empty string can be represented by not writing anything after the equal sign, or by using the none keyword:
; foo = ; Set foo as an empty string
; foo = none ; Set foo as an empty string
; foo = "none" ; Set foo to the string 'none'
;
; If you use constants in dynamic extensions (PHP extensions or Zend extensions) in instruction values,
; then you can only use these constants after loading these dynamically extended command lines.
;;;;;;;;;;;;;;;;;;
;; httpd.conf ;;
;;;;;;;;;;;;;;;;;;
; You can override the value of php.ini for a specific virtual host or directory in httpd.conf for more flexible configuration:
; php_admin_value name value ; Set non bool instructions. Set value to none to clear previous settings
; php_admin_flag name on|off ; Only used to set bool type instructions
; [Tip] Because many commands do not allow the use of php_value/php_flag for setting, it is not recommended to use these two commands.
;
; PHP constants (such as E_ALL) can only be used in php.ini, and corresponding mask values must be used in httpd.conf.
; [Updated on March 2, 2008]
;==========================================================================================
;;==========================================Detailed explanation of configuration instructions========================================
;==========================================================================================
; The set values of each of the following commands are the same as the default values built in PHP-5.2.5.
; That is, if 'php. ini' does not exist, or you delete some lines, the default value is the same.
;;;;;;;;;;;;;;
;; Apache ;;
;;;;;;;;;;;;;;
[Apache]
; Valid only when PHP is used as an Apache module.
child_terminate = Off
; PHP script Whether to allow the use of the apache_child_termine() function to terminate the child process after the request ends.
; This directive is only available when PHP is installed as a module of Apache 1.3 on UNIX platforms. It does not exist under other circumstances.
engine = On
; Whether to enable the PHP parsing engine.
Tip: You can turn on or off the PHP parsing engine in httpd.conf based on the directory or virtual host.
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 as PHP executable bits regardless of the end of the file.
;;;;;;;;;;;;;;;
;; PHP core;;
;;;;;;;;;;;;;;;
[PHP-Core-DateTime]
; The first four configuration options are currently only used for date_sunrise() and date_sunset() functions.
date.default_latitude = 31.7667
; default latitude
date.default_longitude = 35.2333
; default longitude
date.sunrise_zenith = 90.583333
; default sunrise zenith
date.sunset_zenith = 90.583333
; default sunset zenith
date.timezone =
; The default time zone used for all date and time functions when the TZ environment variable is not set.
; PRC should be used in mainland China
; The priority of the application time zone is:
; 1. Time zone set with date_default_timezone_set() function (if set)
; 2. TZ environment variable (if not empty)
; 3. The value of the command (if set)
; 4. PHP speculates by itself (if supported by the operating system)
; 5. If none of the above is successful, use "UTC"
[PHP-Core-Assert]
assert.active = On
; Whether assert() assertion evaluation is enabled
assert.bail = Off
; Whether to abort script execution when failure assertion occurs
assert.callback =
; Callback function executed when failure assertion occurs
assert.quiet_eval = Off
; Whether to use quiet evaluation (no error message is displayed, equivalent to error_reporting=0).
; If it is off, the current error_reporting directive value will be used when evaluating assertion expressions.
assert.warning = On
; Whether to issue a warning for each failed assertion
[PHP-Core-SafeMode]
; Security mode is used to solve sharing The server Is set up on the basis of safety problems.
However, it is not reasonable in structure to try to solve this problem in the PHP layer,
; The correct approach should be to modify the web server layer and the operating system layer.
; Therefore, the security mode is abolished in PHP 6, and the security protection based on open_basedir is used.
; This part of instructions has been deleted in PHP6.
safe_mode = Off
; Whether to enable safe mode.
; When opened, PHP will check whether the owner of the current script is the same as the owner of the file being operated,
; The same operation is allowed, and the different operation is rejected.
safe_mode_gid = Off
; In security mode, UID comparison check is performed by default when accessing files.
However, in some cases, strict UID check is not suitable, and loose GID check is enough.
; If you want to expand it to only GID comparison, you can open this parameter.
safe_mode_allowed_env_vars = "PHP_"
; In safe mode, you can only change the prefix list of environment variables (comma separated).
; Allow users to set certain environment variables, which may lead to potential security vulnerabilities.
; Note: If this parameter value is empty, PHP will allow the user to change any environment variable!
safe_mode_protected_env_vars = "LD_LIBRARY_PATH"
; A comma separated list of environment variables that users cannot change in safe mode.
; These variables are protected even if the safe_mode_allowed_env_vars directive is set to allow them.
safe_mode_exec_dir = "/usr/local/php/bin"
; In the security mode, only the executable programs in this directory are allowed to be executed by the functions of the executed system programs.
; These functions are: system, escapeshellarg, escapeshellcmd, exec, passthru,
; proc_close, proc_get_status, proc_nice, proc_open, proc_terminate, shell_exec
safe_mode_include_dir =
; In the security mode, when the files in the group directory and its subdirectories are included, the UID/GID check will be skipped.
In other words, if the value here is empty, any file whose UID/GID does not match is not allowed to be included.
; The directory set here must already exist in the include_path directive or be included in the full path.
; Multiple directories are separated by colons (semicolons under Win).
; The specified limit is actually a prefix, not a directory name,
; that is, "/dir/include" will allow access to "/dir/include" and "/dir/includes"
; If you want to control access in a specified directory, please add a slash at the end.
[PHP-Core-Safe]
allow_url_fopen = On
; Whether to allow opening remote files
allow_url_include = Off
; Whether to allow include/require remote files.
disable_classes =
; This directive accepts a comma separated list of class names to disable a specific class.
disable_functions =
; This directive accepts a comma separated list of function names to disable specific functions.
enable_dl = On
; Whether the dl() function is allowed. The dl() function is only valid when PHP is installed as an Apache module.
; The dl() function is disabled mainly for security reasons, because it can bypass the open_basedir directive.
; The dl() function is always disabled in safe mode, regardless of how it is set here.
The instruction is deleted in PHP6, which is equivalent to setting it as Off.
expose_php = On
; Whether to expose the fact that PHP is installed on the server (add it in the http header autograph )。
; It does not pose a direct threat to security, but it makes the client know that PHP is installed on the server.
open_basedir =
; All files (including the file itself) that PHP allows to operate are restricted to this directory list.
; When a script attempts to open a file outside the specified directory tree, it will be rejected.
; All symbolic connections will be resolved, so it is impossible to avoid this restriction through symbolic connections.
; Special value '.' The directory specified for storing this script will be used as the base directory,
; But this is a bit dangerous, because the working directory of the script can be easily changed by chdir().
; For shared servers, it is very useful to flexibly set this directive in httpd.conf for different virtual hosts or directories.
; Separate directories with semicolons in Windows and colons in UNIX systems.
; As an Apache module, the open_basedir path in the parent directory will be automatically inherited.
; The specified limit is actually a prefix, not a directory name,
; that is, "/dir/include" will allow access to "/dir/include" and "/dir/includes",
; If you want to control access in a specified directory, please add a slash at the end.
; The default is to allow all files to be opened.
sql.safe_mode = Off
; Whether to use SQL security mode.
If on, specify the default value of data base The linking function will use these default values in place of the supported parameters.
For the connection function of each different database, please refer to the corresponding manual page for its default value.
[PHP-Core-Error]
error_reporting = E_ALL & ~E_NOTICE
; The error report level is the superposition of bit fields. It is recommended to use E_ALL | E_STRICT
; 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 alerts (often bugs, or intentional)
; 16 E_CORE_ERROR Fatal error during initialization of PHP at startup
; 32 E_CORE_WARNING Warning during initialization of PHP startup (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 warnings (non fatal errors)
; 1024 E_USER_NOTICE User defined reminders (often bugs, or intentional)
2048 E_STRICT coding standardization warning (how to modify it for forward compatibility is recommended)
; 4096 E_RECOVERABLE_ERROR Near fatal runtime error. If it is not captured, it will be regarded as E_ERROR
; 6143 E_ALL All errors except E_STRICT (8191 in PHP6, that is, all errors are included)
; You can also use 2147483647 (all binary bits are 1) to open various errors that may occur now or in the future
track_errors = Off
; Whether to save the latest error or warning message in the variable $php_errormsg.
display_errors = On
; Whether to display error information as part of the output.
; On the final published web site, it is strongly recommended that you turn off this feature and use error logs instead (see below).
; Opening this feature on the final published web site may expose some security information,
; For example, the file path, database planning or other information on your web service.
display_startup_errors = Off
; Whether to display errors when PHP starts.
; Even if the display_errors command is turned on, turning off this parameter will not display the PHP startup error.
; It is recommended that you turn off this feature, unless you must use it for debugging.
report_memleaks = On
; Whether memory leaks are reported. This parameter only works in PHP compiled in debug mode,
; and must contain E_WARNING in the error_reporting directive
report_zend_debug = On
; no documentation
html_errors = On
; Whether to use HTML tags in error messages.
; Note: Do not use this feature on published sites!
docref_root = ; "//localhost/phpmanual/"
docref_ext = ; ".html"
If the html_errors command is opened, PHP will display a hyperlink on the error message,
; Directly link to a page that describes the error or the function that caused the error.
; You can choose from https://www.php.net/docs.php Download the php manual,
; and point the docref_root command 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 published sites.
error_prepend_string = ; "<font color=#f00>"
; string for output before error message
error_append_string = ; "</font>"
; string for output after error message
xmlrpc_errors = Off
xmlrpc_error_number = 0
; No documents yet
[PHP-Core-Logging]
define_syslog_variables = Off
; Whether to define various system log variables, such as:$ LOG_PID, $LOG_CRON, etc.
; a good idea to turn it off to improve efficiency.
; You can call the define_syslog_variables() function at runtime to define these variables.
error_log =
; The file to log the error to. The file must be writable to Web server users.
; syslog indicates that it is recorded in the system log (event log under NT, Syslog under Unix (3)
; If no value is set here, the error will be recorded in the error log of the Web server.
log_errors = Off
; Whether and where errors are recorded in the log file depends on the error_log command.
; It is strongly recommended that you log errors rather than output them directly when you finally publish the web site,
; This allows you to know that there is a problem without exposing sensitive information.
log_errors_max_len = 1024
; Set the maximum length of the error source associated with the error message attached to the error log.
; The value set here is valid for the displayed and recorded errors and $php_errormsg.
; Set to 0 to allow unlimited length.
ignore_repeated_errors = Off
; Whether to ignore repeated error messages when logging error logs.
; Error messages must appear on the same line of the same file to be considered duplicate.
ignore_repeated_source = Off
; Whether to ignore duplicate error sources when ignoring duplicate error messages.
[PHP-Core-Mail]
; To make mail functions available, PHP must be able to access the sendmail program at compile time.
; If you use other mail programs, such as qmail or postfix, make sure you use the corresponding sendmail package.
PHP will first search sendmail in the PATH environment variable of the system, and then search in the following order:
; /usr/bin:/ usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib
; It is strongly recommended to find sendmail in PATH.
; In addition, the user compiling PHP must be able to access the sendmail program.
SMTP = "localhost"
The host name or IP address of the SMTP server used to send mail in the; mail() function. For win32 only.
smtp_port = 25
; The port number of the SMTP server. For win32 only.
sendmail_from =
; The mail address in the "From:" header used when sending mail. Only for win32
; This option also sets the "Return Path:" header.
sendmail_path = "-t -i"
; For unix only, parameters are also supported (the default is' sendmail - t - i ')
; The path of the sendmail program, usually "/usr/sbin/sendmail or/usr/lib/sendmail".
The; configure script will try to find the program and set it as the default value, but if it fails, it can be set here.
; Systems that do not use sendmail should set this command as a sendmail alternative (if any).
; For example, Qmail users can usually be set to "/var/qmail/bin/sendmail" or "/var/qmail/bin/qmail injection".
; qmail injection does not need any options to process mail correctly.
mail.force_extra_parameters =
; The mandatory additional parameter value passed to the sendmail library as an additional parameter.
; These parameters always replace the fifth parameter of mail(), even in safe mode.
[PHP-Core-ResourceLimit]
default_socket_timeout = 60
; Default socket timeout (seconds)
max_execution_time = 30
; The maximum allowed execution time of each script (seconds), 0 means no limit.
; This parameter helps prevent poor quality scripts from consuming server resources endlessly.
; This instruction only affects the running time of the script itself, and any other time spent outside the running time of the script,
; For example, the use of system()/sleep() function, database query, file upload, etc. are not included.
; In safe mode, you cannot use ini_set() to change this setting at runtime.
memory_limit = 128M
; The maximum number of memory bytes that a script can request (K and M can be used as units).
; This helps prevent poor quality scripts from consuming all memory on the server.
; To be able to use this directive, you must use the "-- enable memory limit" configuration option at compile time.
; If you want to cancel the memory limit, you must set it to - 1.
; After the instruction is set, the memory_get_usage() function becomes available.
max_input_time = -1
; The maximum allowed time (seconds) for each script to parse input data (POST, GET, upload).
; - 1 means no restriction.
max_input_nesting_level = 64
; Maximum nesting depth of input variables (no more explanation documents available)
post_max_size = 8M
; The maximum allowed length of POST data bytes. This setting also affects file upload.
; If POST data exceeds the limit, $_POST and $_FILES will be empty.
; To upload large files, this value must be greater than the value of the upload_max_filesize command.
; If memory limit is enabled, this value should be less than the value of the memory_limit instruction.
realpath_cache_size = 16K
; Specifies the size of the realpath (normalized absolute pathname) buffer used by PHP.
; On systems where PHP opens a large number of files, this value should be increased to improve performance.
realpath_cache_ttl = 120
; The validity period (in seconds) of the information in the realpath buffer.
; For systems with few file changes, you can increase this value to improve performance.
[PHP-Core-FileUpLoad]
file_uploads = On
; Whether to allow HTTP file upload.
; see upload_max_filesize, Upload_tmp_dir, post_max_size directive
upload_max_filesize = 2M
; The maximum size of the file allowed to upload.
upload_tmp_dir =
; The temporary directory where files are stored when uploading files (must be a directory writable by PHP process users).
; If not specified, PHP uses the system default temporary directory.
[PHP-Core-MagicQuotes]
PHP6 deletes the following commands, which is equivalent to Off
magic_quotes_gpc = Off
; Whether to use automatic string escape ('" NULL) for the input GET/POST/cookie data.
; The settings here will automatically affect the value of the $_GEST $_POST $_COOKIE array.
; If this instruction is opened at the same time as the magic_quotes_sybase instruction, only the single quotation mark (') is escaped as (' '),
; Other special characters will not be escaped, that is, (" NULL) will remain the same!!
; It is recommended to turn off this feature and use a custom filter function.
magic_quotes_runtime = Off
; Whether to use automatic string escape ('" NULL) for data generated from external resources at runtime.
; If this instruction is opened, most functions will escape data returned from external resources (databases, text files, etc.).
; For example: data obtained by SQL query, data obtained by exec() function, etc
; If this instruction is opened at the same time as the magic_quotes_sybase instruction, only the single quotation mark (') is escaped as (' '),
; Other special characters will not be escaped, that is, (" NULL) will remain the same!!
; It is recommended to turn off this feature and use a custom filter function as appropriate.
magic_quotes_sybase = Off
; Whether to use automatic string escape in Sybase form (represented by '')
[PHP-Core-HighLight]
highlight.bg = "#FFFFFF"
highlight.comment = "#FF8000"
highlight.default = "#0000BB"
highlight.html = "#000000"
highlight.keyword = "#007700"
highlight.string = "#DD0000"
; Syntax Highlight mode color (usually used to display. phps files).
; Anything that can be accepted by<font color=xxx>will work normally.
[PHP-Core-Langue]
short_open_tag = On
; Whether "<??>" short identification is allowed. Otherwise, "<? Php?>" long identification must be used.
; Do not use short tags unless your php program runs only in a controlled environment and is only for your own use.
; If you want to use PHP with XML, you can choose to turn off this option to facilitate direct embedding of "<? Xml...?>",
; otherwise, you must use PHP to output:<? echo '<? xml version="1.0"'; ?>
; This instruction also affects the abbreviation "<?=", which is equivalent to "<? Echo". To use it, you must also open the short tag.
ASP _tags = Off
; Whether ASP style tag "<%%>" is allowed will also affect the abbreviation "<%=".
This instruction will be deleted in PHP6
arg_separator.output = "&"
; The separator used to separate parameters in the URL generated by PHP.
; You can also use "&" or "," and so on.
arg_separator.input = "&"
; List of separators used by PHP when parsing variables in the URL.
; Each character in the string is treated as a separator.
; You can also use ",&" and so on.
allow_call_time_pass_reference = On
; Whether to force parameters to be passed by reference when calling a function (you will receive a warning every time you use this attribute).
; php opposes this practice and deletes this instruction in PHP 6 (equivalent to setting it as Off), because it affects code cleanliness.
; It is encouraged to explicitly specify which parameters are passed by reference in the function declaration.
; We encourage you to turn off this option to ensure that your script will still work properly in future versions of the language.
auto_globals_jit = On
; Whether it is created only when the $_SERVER and $_ENV variables are used (rather than automatically created when the script starts).
; If these two arrays are not used in the script, opening this instruction will improve the performance.
; To make this directive take effect, you must close the register_globals and register_long_arrays directives.
auto_prepend_file =
auto_append_file =
; Specifies the file name to be automatically resolved before/after the main file. A blank disables the property.
; The file is included as if the include() function was called, so the value of the include_path directive will be used.
; Note: If the script is terminated by exit(), the automatic suffix will not occur.
variables_order = "EGPCS"
; PHP registers the environment, The order of GET, POST, Cookie, and Server variables.
; respectively use E, G. P, C, S means register from left to right, and the new value overwrites the old value.
For example, setting it to "GP" will cause POST variables to overwrite GET variables with the same name,
; and completely ignore the environment, Cookie, Server variable.
; It is recommended to use "GPC" or "GPCS" and use the getenv() function to access environment variables.
register_globals = Off
; Whether E, G. P, C, S variables are registered as global variables.
; Opening this command may cause serious security problems, unless your script has been carefully checked.
; Predefined super global variables are recommended:$_ ENV, $_GET, $_POST, $_COOKIE, $_SERVER
; The instruction is affected by the variables_order instruction.
; This instruction has been deleted in PHP6.
register_argc_argv = On
; Whether to declare $argv and $argc global variables (including the information of GET method).
; It is recommended not to use these two variables and turn off the command to improve performance.
register_long_arrays = On
; Whether to enable the legacy long array (HTTP_ * _VARS).
; Encourage the use of short, predefined super global arrays, and turn off this feature for better performance.
; This instruction has been deleted in PHP6.
always_populate_raw_post_data = Off
; Whether the $HTTP_RAW_POST_DATA variable (raw POST data) is always generated.
; otherwise, this variable is generated only when data of unrecognized MIME type is encountered.
; however, a better way to access the raw POST data is php://input 。
; $HTTP_RAW_POST_DATA is not available for form data with enctype="multipart/form data".
unserialize_callback_func =
; If the deserialization processor needs to instantiate an undefined class,
; The callback function specified here will be called by unserialize() with the name of the undefined class as a parameter,
; to avoid getting incomplete "__PHP_Incomplete_Class" objects.
; If no function is specified here, or the specified function does not contain (or implement) the undefined class, a warning message will be displayed.
; Therefore, this instruction is set only when it is really necessary to implement such a callback function.
; To disable this feature, just leave it blank.
y2k_compliance = On
; Whether the adaptation in 2000 is forced to open (may be adapted in non Y2K browser Caused the problem).
zend.ze1_compatibility_mode = Off
; Whether to use the mode compatible with Zend engine I (PHP 4. x). The instruction will be deleted in PHP 6 (equivalent to Off).
; This will affect object replication, construction (objects without attributes will generate FALSE or 0), and comparison.
; In compatibility mode, objects are passed by value instead of by reference by default.
precision = 14
; The significant digits of floating point data display.
serialize_precision = 100
; Precision (significant digits) when serializing and storing floating point and double precision data.
; The default value can ensure that floating point data will not lose data when it is decoded by the deserializer.
[PHP-Core-OutputControl]
; The output control function is very useful, especially when the HTTP header is sent after the information has been output.
; The output control function will not act on HTTP headers sent by functions such as header () or setcookie (),
; It only affects information similar to the output of the echo () function and information embedded in PHP code.
implicit_flush = Off
; Whether the PHP output layer is required to automatically refresh data after each output block.
; This is equivalent to automatically calling the flush() function after each print (), echo (), and HTML block.
; Opening this option has a serious impact on the performance of program execution, and is generally recommended only for debugging.
; In the CLI SAPI execution mode, the instruction defaults to On.
output_buffering = 0
; Output buffer size (bytes). The recommended value is 4096~8192.
; Output buffering allows you to send HTTP headers (including cookies) even after outputting body content.
; The cost is that the output layer slows down a little.
; Setting the output buffer can reduce the number of writes and sometimes the number of network packets sent.
; The actual benefit of this parameter largely depends on what Web server you use and what script you use.
output_handler =
; Redirects the output of all scripts to an output handler.
For example, when redirecting to the mb_output_handler() function, the character encoding will be transparent To the specified encoding.
; Once you specify an output handler here, the output buffer will be automatically opened (output_buffering=4096).
; Note 0: Only PHP built-in functions can be used here. Custom functions should be specified in the script using ob_start().
; Note 1: Portable scripts cannot rely on this instruction. Instead, the ob_start() function should be used to explicitly specify the output processing function.
; Using this command may cause errors in some scripts you are not familiar with.
; Note 2: You cannot use two output processing functions "mb_output_handler" and "ob_iconv_handler" at the same time.
; You cannot use the "ob_gzhandler" output handler function and the zlib.output_compression instruction at the same time.
; Note 3: If the zlib. output_handler command is used to enable zlib output compression, the command must be empty.
[PHP-Core-Directory]
include_path = ".:/path/to/php/pear"
; Specify a set of directories for the require(), include(), fopen_with_path() functions to find files.
; The format is similar to the PATH environment variable of the system (colon for UNIX, semicolon for Windows):
; UNIX: "/path1:/path2"
; Windows: "\path1;\path2"
; Use '.' in the included path You can allow a relative path, which represents the current directory.
user_dir =
; tells php which directory to go to when using/~username to open the script. It 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_html"
extension_dir = "/path/to/php"
; The directory where the extension library (module) is stored, that is, the directory PHP uses to find dynamic extension modules.
; The default value under Windows is "C:/php5"
[PHP-Core-HTTP]
default_mimetype = "text/html"
default_charset = ; "gb2312"
PHP will automatically output the "Content Type: text/html" HTTP header by default.
; if the default_charset directive is set to "gb2312",
; "Content Type: text/html; charset=gb2312" will be automatically output.
; PHP6 opposes the default_charset instruction and recommends the unicode.output_encoding instruction.
[PHP-Core-Unicode]
PHP6 provides comprehensive Unicode support based on the ICU (International Components for Unicode) library.
; When compiling, you need to use -- with icu dir=<dir>to specify the installation location of ICU header files and libraries.
; Except detect_unicode, all the other instructions are new in PHP 6.
;
PHP6 information is still lacking, so this part may be incomplete or even erroneous.
detect_unicode = On
; Indicates whether the Zend engine detects whether the script contains multi byte characters by checking the BOM (byte order mark) of the script.
; It is recommended to close. PHP6 has cancelled this instruction and replaced its function with the unicode.script_encoding instruction.
unicode.semantics = Off
; Whether Unicode support is enabled.
If you open this command, PHP will become a complete Unicode environment, such as:
; All strings and variables accepted from HTTP will become Unicode, and all PHP identifiers can also use Unicode characters.
In addition, PHP will use Unicode strings internally and be responsible for automatic conversion of surrounding non Unicode characters,
For example, HTTP input/output, stream, file system operation, etc. Even php. ini itself will be parsed according to UTF-8 encoding.
; After enabling this command, you must explicitly specify the binary string. PHP will not make any assumptions about the contents of binary strings,
; Therefore, your program must ensure that it can properly handle binary strings.
If you close this command, PHP will behave exactly the same as before:
; Strings will not become Unicode, files and binary strings will be backward compatible, and php.ini will also be parsed in the "as is" style.
; All functions and operators transparently support Unicode strings whether or not this instruction is opened.
unicode.fallback_encoding = UTF-8
; for all other unicodes*_ The encoding directive sets the default value.
; that is, if a unicode*_ If the encoding instruction is not explicitly set, the value set here will be used.
unicode.runtime_encoding =
; Runtime encoding specifies the encoding used by the PHP engine to convert binary strings internally.
; The settings here have no effect on I/O related operations (such as writing standard output/reading file system/decoding HTTP input variables).
PHP also allows you to explicitly convert strings:
; (binary) $str -- convert to binary string
; (unicode) $str -- convert to Unicode string
; (string) $str -- convert to Unicode string if unicode.semantics is On, otherwise convert to binary string
; For example, if the value of the instruction is iso-8859-1 and $uni is a Unicode string, then
; $str = (binary)$uni
; Wait until a binary string encoded with iso-8859-1.
; PHP will implicitly convert relevant strings to Unicode before connecting, comparing, passing parameters and other operations, and then perform operations.
; For example, when connecting binary strings with Unicode,
; PHP will use the settings here to convert binary strings to Unicode strings, and then operate.
unicode.output_encoding =
; The encoding used by PHP to output non binary strings.
; Automatically convert output content such as' print 'and' echo 'to the code set here (not binary strings).
When writing data to external resources such as files,
; You must rely on stream encoding features or manually encode data using Unicode extended functions.
; In PHP 6, the previous default_charset instruction is opposed, but it is recommended.
; The previous default_charset directive only specifies the character set in the Content Type header, and does not convert the actual output.
; In PHP 6, the default_charset instruction is only valid when unicode. semantics is off.
; After the instruction is set, the value of the instruction will be filled in the 'charset' part of the Content Type output header,
; regardless of how the default_charset directive is set.
unicode.http_input_encoding =
; Encoding of variables (such as $_GET and _ $POST) obtained through HTTP.
; This function was still under development until April 2007
unicode.filesystem_encoding =
; The directory name and file name encoding of the file system.
; File system related functions (such as opendir()) will use this code to accept and return file names and directory names.
; The settings here must be consistent with the actual encoding used by the file system.
unicode.script_encoding =
; The default encoding of the PHP script itself.
; You can use any ICU supported code to write PHP scripts.
; If you want to set the code for a separate script file, you can use it at the beginning of the script
; <? php declare(encoding = 'Shift-JIS'); ?>
. Note: It must start from the first line, without any characters (including blank).
; This method can only affect the script where it is located, and will not affect any other included scripts.
unicode.stream_encoding = UTF-8
unicode.from_error_mode = 2
unicode.from_error_subst_char = 3f
; No documents yet
[PHP-Core-Misc]
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 can run on a Macintosh and process unix or win32 files at the same time,
; Opening this command allows PHP to automatically detect EOL so that fgets() and file() functions can work properly.
; However, it will also lead to incompatible behaviors for those who use the carriage return character (CR) as the item separator in the Unix system.
In addition, there will be a small performance loss when detecting EOL habits in the first line.
browscap = ; "c:/windows/system32/inetsrv/browscap.ini"
; Only PWS and IIS need this setting
ignore_user_abort = Off
; Whether to persist in completing the entire request even after the user aborts the request.
When executing a long request, you should consider opening it,
; Because a long request may cause the user to abort halfway or the browser to timeout.
user_agent = ; "PHP"
; Define the "User Agent" string
;url_rewriter.tags = "a=href,area=href,frame=src,form=,fieldset="
; Although this instruction belongs to the core part of PHP, it is used for the configuration of the Session module
;extension =
; Load dynamic extensions at PHP startup. For example: extension=mysqli.so
; After "=", you can only use the name of the module file, but not the path information.
; The path information should only be provided by the extension_dir directive.
; idea, on Windows, the following extensions have been built in:
; bcmath ; calendar ; com_dotnet ; ctype ; session ; filter ; ftp ; hash
; iconv ; json ; odbc ; pcre ; Reflection ; date ; libxml ; standard
; tokenizer ; zlib ; SimpleXML ; dom ; SPL ; wddx ; xml ; xmlreader ; xmlwriter
[PHP-Core-CGI]
; These instructions are only valid when PHP is running in CGI mode
doc_root =
; "CGI root directory" of PHP. Only valid when it is not empty.
; It is considered unsafe to place executable programs/scripts in the main document directory of the web server (such as "htdocs"),
; For example, scripts are displayed as normal html due to configuration errors.
Therefore, many system administrators will set a directory that can only be accessed through CGI outside the main document directory,
; The contents in this directory will only be parsed and will not be displayed as is.
; If this option is set, PHP will only interpret files in the doc_root directory,
; and ensure that scripts outside the directory are not executed by the PHP interpreter (except user_dir).
; If FORCE_REDIRECT is not specified when compiling PHP and runs in CGI mode on non IIS servers,
; this command must be set (see the safety section in the manual).
; The alternative is to use the cgi.force_redirect directive.
cgi.discard_path = Off
; There is no document (new instruction in PHP6)
cgi.fix_pathinfo = On
; Whether to provide real PATH_INFO/PATH_TRANSLATED support for CGI (comply with cgi specification).
; The previous behavior is to set PATH_TRANSLATED to SCRIPT_FILENAME, regardless of PATH_INFO.
; Turning this option on will cause PHP to modify its path to comply with CGI specifications, otherwise it will still use the old style irregular behavior.
; You are encouraged to open this command and correct the script to use SCRIPT_FILENAME instead of PATH_TRANSLATED.
; For more information about PATH_INFO, see the cgi specification.
cgi.force_redirect = On
; Whether to open cgi forced redirection. It is strongly recommended to open it to provide security protection for PHP running in CGI mode.
If you close it yourself, please be responsible for the consequences.
; Note: It must be closed on IIS/OmniHTTPD/Xitami!
cgi.redirect_status_env =
; If cgi. force_redirect=On and PHP is running on servers other than Apache and Netscape,
; You may need to set a cgi redirection environment variable name, and PHP will look for it to know whether it can continue.
; Setting this variable will lead to security vulnerabilities. Be sure to know what you are doing before setting it.
cgi.rfc2616_headers = 0
; Specifies which header PHP uses when sending HTTP response codes.
; 0 means sending a "Status:" header, which is supported by Apache and other web servers.
If it is set to 1, PHP uses the RFC2616 header.
; Unless you know what you are doing, keep its default value of 0
cgi.nph = Off
; Whether to force the sending of "Status: 200" status codes for all requests in CGI mode.
cgi.check_shebang_line =On
; Whether CGI PHP checks whether the top of the script is marked with #! The starting line.
; If the script wants to run both independently and in PHP CGI mode, this starting line is necessary.
; If you open this command, PHP in CGI mode will skip this line.
fastcgi.impersonate = Off
; FastCGI in IIS supports the ability to imitate client security tokens.
; This enables IIS to define the security context of the request on which the runtime is based.
; mod_fastcgi in Apache does not support this feature (03/17/2002)
; If running in IIS, it is set to On, and the default is Off.
fastcgi.logging = On
; Whether to record the connection through FastCGI.
[PHP-Core-Weirdy]
; These options exist only in the document, but not in the output of the phpinfo() function
async_send = Off
; Whether to send asynchronously.
from = ; " john@doe.com "
; Define the password of anonymous ftp (an email address)
;;;;;;;;;;;;;;;;;;
;; Near core module;;
;;;;;;;;;;;;;;;;;;
[Pcre]
; Perl compatible regular expression module
pcre.backtrack_limit = 100000
; The maximum backtracking steps of PCRE.
pcre.recursion_limit = 100000
; The maximum recursion depth of the PCRE.
; If you set this value to a very high value, the stack space of the process may be exhausted, causing PHP to crash.
[Session]
; unless a variable is registered with session_register() or $_SESSION.
; otherwise, no session record will be automatically added regardless of whether session_start() is used.
; Objects that include resource variables or have circular references contain objects that point to their own references and cannot be saved in the session.
The; register_globals instruction affects the storage and recovery of session variables.
session.save_handler = "files"
; The name of the processor that stores and retrieves the data associated with the session. The default is files.
; If you want to use a custom processor (such as a database based processor), you can use "user".
; If it is set to "memcache", you can use memcache as the session processor (you need to specify the "-- enable memcache session" compilation option).
session.save_path = "/tmp"
; Parameters passed to the storage processor. For the files processor, this value is the path to create the session data file.
; In Windows, the default is the temporary folder path.
; You can use the "N; [MODE;]/path" mode to define the path (N is an integer).
; N indicates that the subdirectory with N-level depth is used instead of saving all data files in one directory.
; [MODE;] is optional, and must use octal number. The default value is "600", which indicates the access permission of the file.
; This is a good idea to improve the performance of a large number of sessions.
; Note 0: Double quotes around "N; [MODE;]/path" cannot be omitted.
; Note 1: [MODE;] does not overwrite the umask of the process.
; Note 2: Php does not automatically create these folder structures. Please use the mod_files.sh script in the ext/session directory to create.
; Note 3: If the folder can be accessed by insecure users (such as the default "/tmp"), a security vulnerability will be created.
; Note 4: When N>0, automatic garbage collection will become invalid. See the following section on garbage collection for details.
; [Security Tip] It is recommended to set different directories for each different virtual host.
;
; For the "memcache" processor, you need to define a comma separated server URL to store session data.
; For example:“ tcp://host1:11211 , tcp://host2:11211 "
; Each URL can contain the parameters passed to that server. The available parameters are the same as Memcache:: The addServer() method is the same.
; for example:“ tcp://host1:11211?persistent=1&weight=1&timeout=1&retry_interval=15 "
session.name = "PHPSESSID"
; The session ID identifier used in cookies can only contain letters and numbers.
session.auto_start = Off
; The session is automatically initialized when the customer visits any page, which is disabled by default.
; Because class definitions must be loaded before the session starts, you cannot store objects in the session if this option is turned on.
session.serialize_handler = "php"
; The processor used to serialize/deserialize data. PHP is the standard serialization/deserialization processor.
; You can also use "php_binary". When WDDX support is enabled, only "wddx" can 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 frequently you visit the session page, the smaller the probability should be. The recommended value is 1/1000~5000.
session.gc_maxlifetime = 1440
; After the number of seconds specified by this parameter is exceeded, the saved data will be treated as' garbage 'and cleaned up by the garbage collector.
; The judgment standard is the time when the data was last accessed (for FAT file system, the time when the data was last refreshed).
; If multiple scripts share the same session.save_path directory but the session.gc_maxlifetime is different,
; then the minimum value in all session.gc_maxlifetime instructions will prevail.
; If you use multiple subdirectories to store data files, the garbage collector will not start automatically.
; You must use a shell script, cron item or other methods that you write yourself 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 there is no "Referer" field in the request header, the session ID will still be considered valid.
; The default value is blank, that is, no check is performed (all are considered valid).
session.entropy_file = ; "/dev/urandom"
; additional external high entropy resources (files) used to create session IDs,
; For example, "/dev/random" or "/dev/urandom" on UNIX systems
session.entropy_length = 0
; The number of bytes read from high entropy resources (recommended value: 16).
session.use_cookies = On
; Whether to use cookies to save the session ID on the client
session.use_only_cookies = Off
; Whether to use cookies only to save session IDs on the client. The default value for PHP6 is On.
; Turn on this option to avoid the security problem caused by using URL to deliver the session.
; However, clients that disable cookies will make the session inoperable.
session.cookie_lifetime = 0
; The cookie validity period for delivering the session ID (seconds), 0 means only valid when the browser is open.
; [Tip] If you cannot guarantee that the server time is strictly consistent with the client time, please do not change this default value!
session.cookie_path = "/"
; Cookie action path of passing session ID.
session.cookie_domain =
; The cookie scope that passes the session ID.
; Null by default indicates the hostname generated according to the cookie specification.
session.cookie_secure = Off
; Whether cookies are sent only over secure connections (https).
session.cookie_httponly = Off
; Whether to add the httpOnly flag in the cookie (only HTTP protocol access is allowed),
; This will cause the client script (JavaScript, etc.) to fail to access the cookie.
; Opening this command can effectively prevent session ID hijacking through XSS attacks.
session.cache_limiter = "nocache"
; set to {nocache | private | public} to specify the cache control mode of the session page,
; or set it to null to prevent sending the command to disable caching in the http response header.
session.cache_expire = 180
; Specify the validity period of the session page in the client cache (minutes)
; session. cache_limiter=nocache, the setting here is invalid.
session.use_trans_sid = Off
; Whether to use clear code to display SID (session ID) in URL.
; It is prohibited by default, because it will bring security risks to your users:
; 1 - The user may send the URL containing a valid sid through email/irc/QQ/MSN Tell others the way.
; 2 - URLs containing valid sids may be saved on public computers.
; 3 - Users may save URLs with fixed sids in their favorites or browsing history.
; URL based session management is always more risky than cookie based session management, so it should be disabled.
session.bug_compat_42 = On
session.bug_compat_warn = On
There is an unspecified "BUG" in versions before PHP 4.2:
; Global session variables can be initialized even when register_globals=Off,
; If you use this feature in versions after PHP 4.3, a warning will be displayed.
; It is recommended to turn off the "BUG" and display a warning. PHP6 deletes these two commands, which is equivalent to setting them all to Off.
session.hash_function = 0
; Hash algorithm for generating SID. SHA-1 is more secure
; 0: MD5 (128 bits)
; 1: SHA-1 (160 bits)
SHA-1 is recommended.
session.hash_bits_per_character = 4
; Specify how many bits to save in each character in the SID string,
; These binary numbers are the results of the hash function.
; 4: 0-9, a-f
; 5: 0-9, a-v
; 6: 0-9, a-z, A-Z, "-", ","
; recommended value is 5
url_rewriter.tags = "a=href,area=href,frame=src,form=,fieldset="
; This instruction belongs to the PHP core, not the Session module.
; Specify which HTML tags to rewrite to include SID (only valid when session. use_trans_sid=On)
; Form and fieldset are special:
If you include them, the URL Rewriter will add a hidden "<input>", which contains information that should be added to the URL.
; If you want to conform to the XHTML standard, please remove the form item and add<fieldset>tags before and after the form fields.
; Note: All legal items need an equal sign (even if there is no value after it).
; The recommended value is "a=href, area=href, frame=src, input=src, form=fakeentry".
session.encode_sources = "globals"
; The controversial instruction in PHP6 has not been decided whether to adopt it. There are no relevant documents.
;;;;;;;;;;;;;;;;
;; Other modules;;
;;;;;;;;;;;;;;;;
[APC-3.0.16]
; Alternative PHP Cache is used to cache and optimize PHP intermediate code
; Compilation/installation/configuration information is in the INSTALL file under the source tree
apc.enabled = On
Whether or not to enable APC. If APC is statically compiled into PHP and you want to disable it, this is the only way.
apc.enable_cli = Off
; Whether to enable the APC function for the CLI version. This command is only opened for testing and debugging purposes.
apc.cache_by_default = On
; Whether buffering is enabled for all files by default.
; If it is set to Off and used together with the apc.filters instruction starting with the plus sign, the file will only be cached when matching the filter.
apc.file_update_protection = 2
When you modify files on a running server, you should perform atomic operations.
; That is, first write in a temporary file, and then rename the file (mv) to the final name.
; text editor and cp, Programs such as tar do not operate in this way, which may cause incomplete files to be buffered.
The default value of 2 means that if the modification time is less than 2 seconds from the access time when accessing the file, no buffering is performed.
; The unfortunate visitor may get incomplete content, but this bad effect will not be expanded through cache.
; If you can ensure that all update operations are atomic operations, you can use 0 to turn off this feature.
; If your system updates slowly due to a large number of IO operations, you need to increase this value.
apc.filters =
; A comma separated list of POSIX extended regular expressions.
; If the source file name matches any pattern, the file will not be cached.
; Note that the file name used for matching is the file name passed to include/require, not the absolute path.
; If the first character of the regular expression is "+", it means that any file matching the expression will be cached,
; If the first character is "-", no match will be cached. "-" is the default value and can be omitted.
apc.ttl = 0
; The number of seconds the cache entry is allowed to stay in the buffer. 0 means never time out. The recommended value is 7200~86400.
; Setting to 0 means that the buffer may be filled with old cache entries, which will result in the inability to cache new entries.
apc.user_ttl = 0
; Similar to apc.ttl, only for each user, the recommended value is 7200~86400.
; Setting to 0 means that the buffer may be filled with old cache entries, which will result in the inability to cache new entries.
apc.gc_ttl = 3600
; The number of seconds that cache entries can exist in the garbage collection table.
; This value provides a security measure, even if a server process crashes when executing the cached source file,
; The source file has been modified, and the memory allocated for the old version will not be recycled until the TTL value is reached.
; Set to zero to disable this feature.
apc.include_once_override = Off
; Optimize the include_once() and require_once() functions to avoid additional system calls.
apc.max_file_size = 1M
; Prevent files larger than this size from being cached.
apc.mmap_file_mask =
; If MMAP support is compiled for APC using -- enable map (enabled by default),
; The value here is the mktemp style file mask passed to the mmap module (recommended value is "/tmp/apc. XXXXXX").
; This mask is used to determine whether the memory mapping area should be file backed or shared memory backed.
; For direct file backed memory mapping, set it to "/tmp/apc. XXXXXX" (exactly 6 X's).
; To use the POSIX style shm_open/mmap, you need to set it to "/apc. shm. XXXXXX".
; You can also set it to "/dev/zero" to use the kernel "/dev/zero" interface for anonymous mapped memory.
; If this directive is not defined, anonymous mapping is enforced.
apc.num_files_hint = 1000
; The approximate number of different script source code files that may be included or requested on the Web server (the recommended value is 1024~4096).
; If you are not sure, set it to 0; This setting is mainly used for sites with thousands of source files.
apc.optimization = 0
; Optimization level (recommended value is 0). The use of this directive is opposed. It may be deleted in the future.
; A positive integer value indicates that the optimizer is enabled. The higher the value, the more aggressive the optimization will be used.
; Higher values may have a very limited speed increase, but it is still under test.
apc.report_autofilter = Off
; Whether to record all scripts that are not automatically cached due to early/late binding.
apc.shm_segments = 1
; The number of shared memory blocks allocated for compiler buffers (1 is recommended).
; If APC runs out of shared memory and has set the apc.shm_size instruction to the maximum value allowed by the system, you can try to increase this value.
; Values other than 1 in the mmap mode are invalid, because the size of shared memory segments passing through the mmap is unlimited.
apc.shm_size = 30
; The size of each shared memory block (in MB, the recommended value is 128~256).
; Some systems (including most BSD variants) have very small shared memory block sizes by default.
apc.slam_defense = 0
; On a very busy server, whether you start a service or modify a file,
; may cause a race condition because multiple processes attempt to cache a file at the same time.
; This directive is used to set the percentage that the process skips caching steps when processing files that are not cached.
For example, if it is set to 75, it means that there is a 75% probability of not caching when encountering files that are not cached, so as to reduce the collision probability.
; Oppose using this command and encourage setting it to 0 to disable this feature. It is recommended to use the apc.write_lock command.
apc.stat = On
; Whether script update checking is enabled.
; Be very careful when changing this command value.
; The default value On means that APC checks whether the script is updated every time it requests a script,
; If updated, recompile and cache the compiled content automatically. However, this has a negative impact on performance.
If it is set to Off, it means that no inspection will be carried out, thus greatly improving the performance.
; However, in order for the updated content to take effect, you must restart the Web server.
; This command is also valid for include/require files. But it should be noted that,
If you use a relative path, APC must check every time you include/require to locate the file.
; The absolute path can skip the check, so we encourage you to use the absolute path for the include/require operation.
apc.user_entries_hint = 4096
; Similar to the num_files_hint directive, only for each different user.
; If you are not sure, set it to 0.
apc.write_lock = On
; Whether the write lock is enabled.
; On a very busy server, whether you start a service or modify a file,
; may cause a race condition because multiple processes attempt to cache a file at the same time.
; Enabling this command can avoid the appearance of race conditions.
apc.rfc1867 = Off
; After the command is opened, for each uploaded file that contains the APC_UPLOAD_PROGRESS field just before the file field,
; APC will automatically create a user cache entry of upload_<key>(<key>is the value of APC_UPLOAD_PROGRESS field).
; It should be noted that file upload tracking is not thread safe here,
; Therefore, if the old file has not been uploaded completely and the new file has started to upload, the tracking of the old file will be lost.
apc.rfc1867_prefix = "upload_"
; Buffer item entry name prefix for rfc1867 upload file
apc.rfc1867_name = "APC_UPLOAD_PROGRESS"
; rfc1867 implied form item name of the uploaded file to be processed by APC
apc.rfc1867_freq = 0
; Update frequency of user rfc1867 upload file cache entries.
; The value can be the percentage of the total file size, or in the form of 'K', ' Absolute dimension at the end of M ',' G '.
; 0 means to update as fast as possible, but this may cause the running speed to decrease.
apc.localcache = Off
; Whether to use the non locked local process shadow cache can reduce the competition between locks when writing to the buffer.
apc.localcache.size = 512
; The shadow cache of the local process should be set to a large enough value, which is about half of num_files_hint.
apc.stat_ctime = Off
; No documents yet
[bcmath]
; Binary Calculator is provided for any precision mathematical calculation,
; It supports numbers of any size and precision, and is described in string form.
bcmath.scale = 0
; the number of 10 decimal numbers used for all bcmath functions
[GD]
gd.jpeg_ignore_warning = Off
; Whether to ignore the warning information of the jpeg decoder (for example, the image format cannot be recognized).
; There are two MIME types: image/jpeg and image/pjpeg. The GD library can only recognize the former traditional format.
[Filter]
; To confirm and filter data with unreliable sources, this expansion module is experimental.
filter.default = "unsafe_raw"
; use the specified filter to filter $_GET$_ POST, $_COOKIE, $_REQUEST data,
; The original data can be accessed through the input_get() function.
; "unsafe_raw" means no filtering.
filter.default_flags =
; The default flag of the filter_data() function.
[mbstring]
; Multi byte string module support
mbstring.language = "neutral"
The default NLS (local language setting) can be set as follows:
; The default value "neutral" means neutral, equivalent to unknown.
; "zh cn" or "Simplified Chinese" means Simplified Chinese
; "zh tw" or "Traditional Chinese" means Traditional Chinese
; "universal" or "universal" means Unicode
; This instruction automatically defines the default value of the subsequent mbstring.internal_encoding instruction,
; and the mbstring.internal_encoding directive must be placed after the directive.
mbstring.internal_encoding =
; This directive must be placed after the mbstring.language directive.
; The default internal code depends on the value of the mbstring.language directive when it is not set:
; "neutral" corresponds to "ISO-8859-1"
; "zh cn" corresponds to "EUC-CN" (equivalent to "GB2312")
; "zh tw" corresponds to "EUC-TW" (equivalent to "BIG5")
; "uni" corresponds to "UTF-8"
; Reminder: For simplified Chinese, it can also be set to "CP936" (equivalent to "GBK")
Note: SJIS, BIG5 and GBK are not suitable as internal codes, but "GB2312" is certainly OK.
; It is recommended to specify manually
mbstring.encoding_translation = Off
; whether the incoming HTTP request is transparently encoded according to the mbstring.internal_encoding instruction,
; that is, automatically detect the encoding of input characters and transparently convert them into internal encoding.
Portable libraries or programs should never rely on automatic code conversion.
mbstring.http_input = "pass"
; The default HTTP input code, "pass" means skip (no conversion)
; The meaning of "aotu" is the same as that in the mbstring.detect_order directive.
; can be set as a separate value or a comma separated list.
mbstring.http_output = "pass"
; The default HTTP output code, "pass" means skip (no conversion)
; The meaning of "aotu" is the same as that in the mbstring.detect_order directive.
; can be set as a separate value or a comma separated list.
; The output_handler directive must be set to "mb_output_handler".
mbstring.detect_order =
; The default code detection sequence, "pass" means skip (no conversion).
; The default value ("auto") varies with the mbstring.language directive:
; "neutral" and "universal" correspond to "ASCII, UTF-8"
; "Simplified Chinese" corresponds to "ASCII, UTF-8, EUC-CN, CP936"
; "Traditional Chinese" corresponds to "ASCII, UTF-8, EUC-TW, BIG-5"
; It is recommended to specify a single value manually in a controllable environment
mbstring.func_overload = 0
; Automatically use the mb_ * function to overload the corresponding single byte string function.
; For example: mail(), ereg() will be automatically replaced with mb_send_mail(), mb_ereg()
; 0, 1, 2, 4 can be used for bit combination. For example, 7 means to replace all. The specific replacement description is as follows:
; 0: No replacement
; 1: mail() → mb_send_mail()
; 2: strlen() → mb_strlen() ; substr() → mb_substr()
; strpos() → mb_strpos() ; strrpos() → mb_strrpos()
; strtolower() → mb_strtolower() ; strtoupper() → mb_strtoupper()
; substr_count() → mb_substr_count()
; 4: ereg() → mb_ereg() ; eregi() → mb_eregi()
; ereg_replace() → mb_ereg_replace() ; eregi_replace() → mb_eregi_replace()
; split() → mb_split()
mbstring.script_encoding =
; Encoding used by script
mbstring.strict_detection = Off
; Whether rigorous code detection is used
mbstring.substitute_character =
; When a character cannot be decoded, it is replaced by this character.
; If it is set as an integer, it indicates the corresponding Unicode value. If no value is set, it indicates that the error character is not displayed.
; it is recommended to set it as "□"
[Mcrypt]
; An interface to the mcrypt library, which supports many block encryption algorithms.
; It is not recommended to use this module, because there are too many problems, it is recommended to encrypt in the database layer.
mcrypt.algorithms_dir =
; The directory where the default encryption algorithm module is located. Usually "/usr/local/lib/libmcrypt".
; There is no detailed description document at present, and the explanation here may be wrong.
mcrypt.modes_dir =
; The directory where the default encryption mode module is located. Usually "/usr/local/lib/libmcrypt".
; There is no description document at present, and the explanation here may be wrong.
[Memcache-2.2.2]
; a high-performance distributed memory object caching system, which maintains a unified huge hash table in memory,
; It can be used to store data in various formats, including images video , files and database retrieval results.
memcache.allow_failover = On
; Whether to fail over transparently to other servers when encountering errors.
memcache.chunk_size = 8192
; Data will be transferred according to the block size set by this value. Smaller values require more additional network traffic.
; If you find an unexplained decrease in speed, you can try to increase this value to 32768.
memcache.default_port = 11211
; The default TCP port used when connecting to the Memcached server.
memcache.max_failover_attempts = 20
; The maximum number of servers to try when receiving and sending data is valid when memcache.allow_failover is opened.
memcache.hash_strategy = "standard"
; Controls the policy of mapping keys to servers. The default value of "standard" means to use the old hash policy of the previous version.
; Setting it to "consistent" allows you to add/delete servers in the connection pool without recalculating the mapping relationship between the key and the server.
memcache.hash_function = "crc32"
; Controls the hash function that maps the key to the server. The default value "crc32" uses the CRC32 algorithm, while "fnv" uses the FNV-1a algorithm.
FNV-1a is slightly slower than CRC32, but the hashing effect is better.
[Zlib]
; This module allows PHP to transparently read and write gzip (. gz) compressed files.
zlib.output_compression = Off
; Whether to use zlib library to transparently compress script output results.
; The value of this command can be set to: Off、On、 Number of bytes (compressed buffer size, 4096 by default).
If you open this command, when the browser sends the "Accept Encoding: gzip (deflate)" header,
; The "Content Encoding: gzip (deflate)" and "Vary: Accept Encoding" headers will be added to the response header.
; You can use the ini_set() function to enable or disable this feature in the script before the response header is output.
; If an answer header such as "Content Type: image/??" is output, compression will not be enabled (to prevent Netscape bugs).
; You can use "ini_set ('zlib. output_compression ',' On ')" to reopen this feature after outputting "Content Type: image/??".
; Note 1: The compression ratio will be affected by the size of the compression buffer. If you want better compression quality, please specify a larger compression buffer.
; Note 2: If zlib output compression is enabled, the output_handler directive must be empty, and the value of zlib.output_handler directive must be set.
zlib.output_compression_level = -1
; compression level. The available values are 0~9. 0 means no compression. The higher the value, the better the effect. However, the more CPU is used. The recommended value is 1~5.
; The default value of - 1 means to use the default value (6) inside zlib.
zlib.output_handler =
; When the zlib.output_compression instruction is opened, you can only specify the output processor here.
; Processors that can be used are "zlib. inflate" (decompression) or "zlib. deflate" (compression).
; If the command is enabled, the output_handler command must be set to null.
[dbx]
; A database abstraction layer that provides a unified interface for different databases. Currently supported:
; FrontBase,SQL Server,MySQL,ODBC,PostgreSQL,Sybase-CT,Oracle 8,SQLite
dbx.colnames_case = "unchanged"
; The field name can be returned as "unchanged" or "uppercase" or "lowercase".
[MySQLi]
; The MySQL i module can only work with MySQL above 4.1.3.
mysqli.max_links = -1
; The maximum number of connections allowed in each process (persistent and non persistent)- 1 means unlimited
mysqli.default_port = 3306
; mysqli_connect() is the default TCP port used when connecting to the MySQL database.
; If no default value is specified here, it will be searched in the following order:
; (1) $MYSQL_TCP_PORT environment variable
; (2) mysql tcp item in the/etc/services file (unix)
; (3) MYSQL_PORT constant specified at compile time
; Note: Under Win32, only the MYSQL_PORT constant is used.
mysqli.default_socket =
; mysqli_connect() is the default socket name used when connecting to the local MySQL server.
; If not specified, the built-in MqSQL default value will be used.
mysqli.default_host =
; mysqli_connect() is the default host used when connecting to the MySQL database. Invalid in safe mode.
mysqli.default_user =
; mysqli_connect() is the default user name used when connecting to the MySQL database. Invalid in safe mode.
mysqli.default_pw =
; mysqli_connect() is the default password used when connecting to the MySQL database. Invalid in safe mode.
; Saving the password in the configuration file is a bad idea. Any user with PHP permissions can run
; 'echo cfg_get_var ("mysql. default_password")' to display the password!
; Any user who has read permission to the configuration file can also see the password.
mysqli.reconnect = Off
; Allow reconnection
[PostgresSQL]
; The PostgresSQL module is recommended to work with versions above 8.0.
pgsql.allow_persistent = On
; Allow persistent connections
pgsql.max_persistent = -1
; The maximum number of persistent connections allowed in each process- 1 means unlimited.
pgsql.max_links = -1
; The maximum number of connections allowed in each process (persistent and non persistent)- 1 means unlimited.
pgsql.auto_reset_persistent = Off
; Automatically reset persistent connections that have been interrupted on pg_pconnect(). Detection requires some additional overhead.
pgsql.ignore_notice = Off
; Whether to ignore the reminder message on the back end of PostgreSQL.
; Recording backend alert messages requires a small amount of additional overhead.
pgsql.log_notice = Off
; Whether to record the reminder message of the PostgreSQL backend in the log.
; can be recorded only when pgsql. ignore_notice=Office.
---------------------------------------------Translator: Jin Buguo