php.ini

高洛峰
Release: 2023-03-02 19:26:02
Original
1130 people have browsed it

P>[PHP]

;;;;;;;;;;;;;;;;;;;
; About this file ;
;;;;;;;;;;;;;;;;; ;;;

; This file controls many aspects of PHP. In order for PHP to read this file, it must be named 'php.ini'. PHP will search for the file in these places in sequence: the current working directory; the path specified by the environment variable PHPRC
; and the path specified during compilation.
; Under Windows, the path when compiling is the Windows installation directory.
; In command line mode, the search path of php.ini can be replaced with the -c parameter.

; The syntax of this file is very simple. Whitespace characters and lines starting with a semicolon ';' are simply ignored (as you might

; guess). Section titles (eg: [Foo]) are also simply ignored, even though they may
; have some meaning in the future.
;
; Directives are specified using the following syntax:
; directive = value
; directive = value
; directives are *case-sensitive* - foo=bar is different from FOO = bar.
;
; The value can be a string, a number, a PHP constant (such as: E_ALL or M_PI), an
; in an INI constant (On, Off, True, False, Yes, No and None), or An expression
; (eg: E_ALL & ~E_NOTICE), or a quoted string ("foo").
;
; Expressions in INI files are restricted to bitwise operators and parentheses.
; | bitwise OR
; & bitwise AND
; ~ bitwise NOT
; ! boolean NOT
;
; The Boolean flag is available as 1, On, True or Yes. These values ​​are turned on.
; They can be set to off with a value of 0, Off, False or No.
;
; An empty string can be represented by not writing anything after the equal sign, or using the None keyword:
;
; foo = ; set foo to an empty string
; foo = none ; set foo to Empty string
; foo = "none" ; Set foo to the string 'none'
;
; If you use constants in value settings, and these constants belong to dynamically loaded extension libraries (not PHP extensions, that is
; Zend extensions), you can only use these constants *after* the lines that call in those extensions.
;
; All values ​​set in the php.ini-dist file are the same as the built-in defaults (this means that if php.ini
; is not used or you delete these lines, the defaults are the same as same).

;;;;;;;;;;;;;;;;;;;;;;
; Language options      
engine = On
; Make the PHP scripting language engine (PHP scripting language engine) effective under Apache.

short_open_tag = On

; allows the tags will be recognized.
asp_tags = Off
; Allow ASP-style <% %> tags
precision = 14
; The number of significant digits when displaying floating point type numbers

y2k_compliance = Off
; Whether to turn on 2000 adaptation (possibly in non-Y2K Causes problems in adapted browsers)

output_buffering = Off
; Output caching allows you to send header (headers, including cookies) lines even after outputting the body content

; The cost is that the output layer slows down a little. You can use Output Cache to turn on output caching at runtime,

; or set the directive to On here to turn on output caching for all files.

implicit_flush = Off
; Force flush (refresh) to let PHP tell the output layer to automatically refresh its own data after each output block.

; This is equivalent to calling the flush() function after every print() or echo() call and after every HTML block.

; Turning on this setting will cause serious runtime conflicts. It is recommended to turn it on only during debugging.

allow_call_time_pass_reference = On
; Whether to force parameters to be passed by reference when calling the function. This method was protested,

; and may no longer be supported in future versions of PHP/Zend.

; It is encouraged to specify which parameters are passed by reference in the function declaration.
; You are encouraged to try turning this option off and verify that your scripts still work, to ensure that they will still work in future versions of the language
; (You will get a warning every time you use this feature, and arguments will be passed by value rather than by reference
;).

; Safe Mode Safe Mode
safe_mode = Off

safe_mode_exec_dir =

safe_mode_allowed_env_vars = PHP_
; ? Setting certain environment variables
;? may be a potential security breach.
; The directive contains a comma-separated list of prefixes. In safe mode, users can only replace
; with the values ​​of environment variables that begin with the prefixes listed here.
; By default, users will only be able to set environment variables starting with PHP_ (eg: PHP_FOO=BAR).
; Note: If this directive is empty, PHP will let the user change any environment variables!

safe_mode_protected_env_vars = LD_LIBRARY_PATH
; This directive contains a comma-separated list of environment variables that the end user will not be able to change with putenv ().
; These variables are protected even when safe_mode_allowed_env_vars is set to allowed.

disable_functions =    
; This directive allows you to disable specific functions for security reasons.
; It accepts a comma separated list of function names.
; This instruction is *not* affected by whether Safe Mode is turned on or not.

; Color of syntax highlighting mode.
; Anything acceptable by will work. GHighlight.string = #DD0000

highlight.comment = #ff8000

highlight.keyword = #007700
highlight.bg = #fffffffault.Default = #0000B B
Highlight.html = #000000

; Misc miscellaneous item
expose_php = Off

; Determines whether PHP should indicate the fact that it is installed on the server (ie: add to the signal it - PHP - sends to the Web service

; ).
; (My personal opinion is to turn this off when any power-by header appears.)
; It does not pose a security threat, but it makes it easier to check whether PHP is installed on your server. possible. Resource Limits ;
= 30 ; The maximum execution time of each script, in seconds
memory_limit = 8388608 ; The maximum total amount of memory that can be used by a script (here is 8MB)

;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;
; Error handling and logging ;
; ;;;;;;;;;;;;
; Error reporting is bitwise. Or add up the numbers to get the desired error reporting level.

; E_ALL - all errors and warnings

; E_ERROR - fatal runtime errors
; E_WARNING - runtime warnings (non-fatal errors)

; E_PARSE - compile-time parsing errors

; E_NOTICE - runtime reminders (these are often It's caused by a bug in your code,
 E_CORE_ERROR - Fatal error that occurs during the initialization process of PHP startup
; E_CORE_WARNING - Warning (non-fatal error) that occurs during the initialization process of PHP startup
; E_COMPILE_ERROR - Fatal error during compilation
; E_COMPILE_WARNING - Compilation warning ( Non-fatal error)
; E_USER_ERROR - user-generated error message
; E_USER_WARNING - user-generated warning message
; E_USER_NOTICE - user-generated reminder message
; Example:
; error_reporting = E_ALL & ~E_NOTICE ; Display all errors, Except for reminders
; error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR ; Show only errors
error_reporting = E_ALL & ~E_NOTICE ; Show all errors except for reminders
display_errors = On ; Show error messages (as part of the output)

; In final release It is strongly recommended that you turn off this feature and use

; error logs instead (see below).
; Continuing to enable display_errors on the final published website may
; expose some security-related information, such as your File path on the web service,
; Your database plan or other information.

log_errors = Off ; Record errors in the log file (server-specified log, stderr standard error output, or error_log (below))
; As stated above, it is strongly recommended that you log errors in the final published website
; instead of direct error output

track_errors = Off ; Save the latest error/warning message in the variable $php_errormsg (boolean)
;error_prepend_string = "" ; The string output before the error message
;error_append_string = "
" ; The string output after the error message
;error_log = filename ; Record the error log in the specified file
;error_log = syslog ; Record the error log in the system log syslog (event log under NT, invalid under Windows 95)
warn_plus_overloading = Off ; Warn when using '+' for strings


;;;;;;;;;;;;;;;;;;
; Data Handling ;
;;;;;;;;;;;;;;;;;;
variables_order = "EGPCS" ; this The instructions describe the order in which PHP records
; ; GET, POST, Cookie, Environment and Built-in variables. P; (G, P, C, E & S represents, usually cited in EGPCS or GPC). ; According to the record from left to right, the new value replaces the old value.

register_globals = On ; Whether to register these EGPCS variables as global variables.

; You may want to turn this off if you don't want user data to be cluttered globally.

                                                                                                                                            ’ ’ ’ ’ ’ ’ ’ ’ ’ s ’ ’ ’ t ‐ ‐ ‐ ‐ ‐ used in conjunction with track_vars to track_vars ,
          ;            

register_argc_argv = On ; This instruction tells PHP whether to declare the argv and argc variables

; (Note: here argv is an array and argc is the number of variables)

; (which contains data passed by the GET method).
                                                              ; If you don’t want to use these variables, you should turn it off to improve performance.

track_vars = On ; Validate the $HTTP_*_VARS[] array, where * is replaced with

    ; Use variables_order instead.


; Magic quotes

magic_quotes_gpc = On ; Use magic quotes in the input GET/POST/Cookie data

; (The original text is like this, haha, the so-called magic quotes should refer to using escape characters to add reference control characters , such as '....)

magic_quotes_runtime= Off ; Use magic quotes for data generated during runtime,

; For example: data obtained by SQL query, data obtained by the exec() function, etc.
magic_quotes_sybase = Off ; Magic references in the form of Sybase (use 'extract' instead of ')

; Automatically add files before and after PHP documentation
auto_prepend_file =
auto_append_file =

; Like 4.04b4, PHP always defaults to "Content- type:” The header outputs the encoding of a character.
; Disables the output character set as long as it is set to empty.
; PHP's built-in default is text/html

default_mimetype = "text/html"

;default_charset = "iso-8859-1"

;;;;;;;;;;;;;;;;; ;;;;;;;;;;
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;

include_path =    ; ; include path settings, UNIX: "/path1:/path2" Windows: "path1;path2"

doc_root = ; The root path of the php page, only valid when it is not empty
user_dir = ; Tell PHP which directory to look for when opening the script using /~username. Valid only when non-empty
;upload_tmp_dir =                                                                                                       ‐                                 ’ being locating to locating file ’ s to be so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so so long so so so so so so so so so so so... ; Directory that stores loadable expansion libraries (modules)
enable_dl = On ; Whether to enable dl().
               ; The dl() function *doesn’t* work well on multi-threaded servers,
                                                                                                                    ; ;;;;;;;;;;;
; Dynamic Extensions ;
; If you want an extension library To load automatically, use the following syntax:
; extension=modulename.extension
; For example, on Windows,
; extension=msql.dll
; or under UNIX,

; It should be the name of the module, no directory information is needed in it.

; Use the extension_dir directive above to specify the location of the extension library. Extension=php_nsmail.dll extension=php_msql2.dll
.dll
; Note that MySQL support is now built-in, so there is no need to use its dll


;;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;; ;;

[Syslog]

define_syslog_variables = Off ; Whether to define various system log variables
    ; Such as: $LOG_PID, $LOG_CRON, etc.
           ; Turning it off is a good idea to increase efficiency.
                                                                                                                                    ; sendmail_path = ; only for unix, also supports parameters (the default is 'sendmail -t -i')

[Debugger]

debugger.host = localhost
debugger.port = 7869
debugger.enabled = False

[ Logging]

; These configurations indicate the logging mechanism used for the example.

; See examples/README.logging for more explanation
;logging.method = db
;logging.directory = /path/to/log/directory

[SQL]

sql.safe_mode = Off

[ODBC ]
;uodbc.default_db = Not yet implemented
;uodbc.default_user = Not yet implemented

;uodbc.default_pw = Not yet implemented

uodbc.allow_persistent = On ; Allow or disable persistent connections
uodbc.check_persistent = On ; Before reuse Check if the connection is still available

uodbc.max_persistent = -1 ; Maximum number of persistent connections. -1 represents unlimited

uodbc.max_links = -1; The maximum number of connections (persistent and non-persistent). -1 represents unlimited
uodbc.defaultlrl = 4096; Controls LONG type fields. Returns the number of bytes of the variable, 0 means pass (?) 0 means passthru
uodbc.defaultbinmode = 1; Control binary data. 0 represents Handling of binary data. 0 means passthru, 1 return as is, 2 convert to char
; See the documentation for odbc_binmode and odbc_longreadlen for an explanation of uodbc.defaultlrl and uodbc.defaultbinmode.

[MySQL]
mysql.allow_persistent = On ; Allow or disable persistent connections
mysql.max_persistent = -1 ; Maximum number of persistent connections. -1 represents unlimited
mysql.max_links = -1; The maximum number of connections (persistent and non-persistent). -1 represents unlimited
mysql.default_port = ; The default port used by mysql_connect(). If not set, mysql_connect()
        ; will use the variable $MYSQL_TCP_PORT, or the mysql-tcp entry (unix) under /etc/services,是; Or compilation is the defined mysql_port (in this order); Win32 environment will only check MySQL_PORT.

mysql.default_socket = ; The default socket name used for local MySql connections. If empty, use the MYSQL built-in value


mysql.default_host = ; The host used by mysql_connect() by default (invalid in safe mode)
mysql.default_user = ; The user name used by mysql_connect() by default (invalid in safe mode)
mysql .default_password = ; The default password used by mysql_connect() (not valid in safe mode)
                                                                                                                                                                                                                                             echo cfg_get_var("mysql.default_password")' to display that password!
&


Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template