php.ini Chinese version

zhaozj2021-02-12  144

PHP]

PHP is still a constantly developing tool, its function is still constantly being reduced

And the setting changes for php.ini reflect considerable changes.

Before using the new PHP version, study PHP.ini will be beneficial.

;;;;;;;;;;;;;;;;;;;

About this document;

;;;;;;;;;;;;;;;;;;;

This file controls many views of PHP. In order to let PHP read this file, it must be named

'PHP.INI'. PHP will look for this file in these places: current work catalog; environment variable phprc

The path specified by the specified path;

Under Windows, the path to compile is a Windows installation directory.

In command line mode, the PHP.INI's lookup path can be replaced with the -c parameter.

The syntax of the file is very simple. Blank characters and semicolons ';' starting lines are simply ignored (just like you may

Gu. The chapter title (for example: [foo]) is also simply ignored, even if they may

There is a certain meaning.

;

Indicates that the following syntax is specified:

Indicator identifier = value

Directive = Value

The indication identifier is * 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), ini

A (ON, OFF, TRUE, FALSE, YES, NO AND NONE), or an expression

(, Such as: e_all & ~ e_notice), or the string ("foo") enclosed with quotation marks.

;

The expression of the INI file is limited to position operators and parentheses.

| | Bitwise OR

& bitwise and

~ Bitwise Not

;! Boolean NOT

;

The Boolean flag can be placed in the state of 1, ON, True or Yes.

They can be placed in the relationship with 0, OFF, FALSE OR NO.

;

An empty string can be used to use anything after the equal sign, or use a None keyword:

;

; foo =; set foo to empty strings

Foo = none; set foo to empty string

Foo = "none"; set the FOO to string 'none'

;

If you use constants in your value setting, these constants belong to the dynamically transferred extension library (not PHP expansion,

; Zend's extension), you can only transfer these extended rows * * Use these constants.

;

All the values ​​set in the php.ini-dist file are the same as the built-in default value (this is said if pHP.ini

Did not be used or you deleted these rows, the default value is the same as it).

;;;;;;;;;;;;;;;;;;;;;

Language options;

;;;;;;;;;;;;;;;;;;;;;

Engine = on

Make PHP Scripting Language Engine (PHP Scripting Language Engine) is valid under Apache.

Short_open_tag = on

; Allow tags will be identified.

ASP_TAGS = OFF

Allow Asp-Style <%%> Tags

Precision = 14; the number of valid bits when the floating point type

Y2K_compliance = OFF

Whether to open 2000 adaptation (may result in problems in a browser that is not Y2K adaptation)

Output_buffering = OFF

Output cache allows you to send Header after outputting the text content, including a cookies

The cost is that the output layer slows down a little speed. You can use the output to open the output cache when there is runtime.

Alternatively, it will indicate an ON here such that all files output cache open.

Output_handler =; You can redirect all output to a function,

It is useful to do it for processing or logging it.

For example, if you set this OUTPUT_HANDLER to "ob_gzhandler",

The output will be transparently compressed for browser that supports Gzip or Deflate encoded.

The output processor is set automatically opens the output buffer.

IMPLICIT_FLUSH = OFF

Forced Flush (refresh) Let PHP tell the output layer to automatically refresh their own data after each output block.

This is equivalent to calling a flush () function after each print () or echo () call and each HTML block.

Opening this setting causes a serious runtime conflict, it is recommended to open only during the Debug process.

Allow_call_time_pass_reference = on

Whether it will transfer parameters by reference when the forced function is called. This method is protest,

And may not be supported in the future version of PHP / Zend.

The method of encouragement specifies which parameters is transmitted by reference to the function declaration.

You are encouraged to try to close this option and confirm that your script will still work properly to ensure in the future version of the language.

They still work. (You will get a warning every time you use this feature, and the parameters will be valued instead of reference.

Transfer).

; SAFE MODE security mode

SAFE_MODE = OFF

SAFE_MODE_EXEC_DIR =

SAFE_MODE_ALLOWED_ENV_VARS = PHP_

;? Setting Certain Environment Variables

;? May Beh Potential Security Breach.

This indicator contains a comma-separated prefix list. In safe mode, users can only replace

The value of the environment variable at the beginning of the prefix listed here.

By default, the user will only set the environment variable starting with PHP_ (eg pHP_foo = BAR).

; Note: If this indication is empty, the PHP will let the user change any environment variable!

SAFE_MODE_PROTECTED_ENV_VARS = LD_LIBRARY_PATH

This indicator contains a list of environment variables separated by commas, which will not change with Putenv ().

These variables are protected even in the case where SAFE_MODE_ALOWED_ENV_VARS is set to allow.

Disable_functions =

This indication allows you to make a specific function for a safe reason.

It accepts a list of functions separated by commas.

This indication * is not affected by * security mode.

The color of the syntax highlight mode.

As long as you can be able to work with anything accepted by .

Highlight.string = # dd0000

HIGHLIGHT.COMMENT = # ff8000

HIGHLIGHT.KEYWORD = # 007700

Highlight.bg = #ffffffff

Highlight.default = # 0000bb

HIGHLIGHT.HTML = # 000000

MISC miscellaneous

Expose_php = OFF

Decide whether the PHP indicates that it is installed on the server (for example: adding in it-php- to Web service)

The transmitted signal).

(I am personal opinion, when there is a Power-by HEADER, turn it off.)

It doesn't have a security threat, but it makes it possible to check if PHP is installed on your server.

;;;;;;;;;;;;;;;;;;;

Resource Limits;

;;;;;;;;;;;;;;;;;;;

Max_execution_time = 30; maximum execution time of each script, at seconds

Memory_limit = 8388608; A total of the maximum amount of memory available (here 8m

;;;;;;;;;;;;;;;;;;;;;;;;;;

Error Handling and Logging;

; Error control and registration;

;;;;;;;;;;;;;;;;;;;;;;;;;;

Error report is bitbusted. Or add a number to get the desired error report level.

; E_all - all errors and warnings

; E_ERROR - Faturation is wrong

; E_warning - Warning when running (non-poorly wrong)

; E_PARSE - Analysis of errors when compiling

; E_NOTICE - Operation reminder (these often cause the bug of your code,

It may also be due to intentional behavior. (Such as: automatic initialization based on unin-initialized variables is one

; Empty string of facts use an uninited variable)

E_CORE_ERROR - fatal error occurred during initialization during PHP startup

E_CORE_WARNING - Warnings (non-poor misfaming) during initialization during PHP startup occurs

; E_compile_error - fatality is wrong when compiling

; E_compile_warning - Compile time warning (non-poor mistake)

; E_USER_ERROR - Error Messages generated by the user

; E_USER_WARNING - Warning message generated by the user

; E_user_notice - a reminder message generated by the user

; Example:

Error_Reporting = E_ALL & ~ E_NOTICE; Show all errors, in addition to remind

; error_reporting = e_compile_error | E_ERROR | E_CORE_ERROR; only displays an error

Error_reporting = e_all & ~ e_notice; display all errors, in addition to remind

Display_errors = ON; Display error message (as part of the output)

At the final WEB site, it is highly recommended that you turn off this feature and use it.

Error log replacement (see below).

; Continue to make Display_ERRORS valid in the final released Web site

Exposing some information about security, such as file paths on your web service,

Your database planning or other information.

Display_startup_errors = OFF; even when Display_ERROES is opened, the step of starting in PHP

The error will not be displayed.

It is highly recommended to keep Display_Startup_ERRORS to close,

In addition to the incap process.

Log_ERRORS = OFF; record errors in the log file (the server specified by the server, the StderR standard error output, or Error_Log (below))

As in the above description, it is highly recommended that you have a logging error in the finally released Web site.

Replacing direct error output. TRACK_ERRORS = OFF; save the most recent error / warning message in Variable $ PHP_ERRORMSG (Boolean)

Error_prepend_string = ""; string output before the error message

Error_Append_string = ""; string output after the error message

; error_log = filename; Record error log in the specified file

Error_log = syslog; Record Error Logs in System Log Syslog (Event Log under NT, WINDOWS 95 is invalid)

WARN_PLUS_OVERLOADING = OFF; warning when ' ' is used for strings

;;;;;;;;;;;;;;;;;

Data Handling;

;;;;;;;;;;;;;;;;;

Variables_order = "egpcs"; this indication describes PHP records

Get, POST, Cookie, Environment and Built-in these variables.

((Represented by G, P, C, E & S, usually referenced by EGPCS or GPC).

Press from left to right records, the new value replaces the old value.

Register_globals = on; whether these EGPCS variables are registered as global variables.

If you don't want user data, you may want to close it.

This is more meaningful to connect with track_vars - so you can pass

; $ Http _ * _ vars [] array access all GPC variables.

Register_argc_argv = ON; This indication tells PHP to declare Argv and Argc variables

(Note: Here Argv is an array, ARGC is the number of variables)

((Therein contains data from the GET method).

If you don't want to use these variables, you should turn off it to improve performance.

TRACK_VARS = ON; An array of $ http _ * _ vars [] is valid, here * is used in use; ENV, POST, GET, Cookie or Server replace post_max_size = 8m; PHP will accept the maximum size of the POST data accepted. GPC_ORDER = "GPC"; this indication is opposed. Use Variables_Order instead. Magic quotesmagic_quotes_gpc = ON; use magic references in the input GET / POST / COOKIE data; (in this way, huh, the so-called MAGIC quotes should refer to control characters with escape character to the reference ", such as' .. ..) Magic_quotes_Runtime = Off; uses a magic reference to the data generated at runtime,, for example: data obtained with the SQL query, the data obtained with the exec () function, etc. Magic_quotes_sybase = off; use the Sybase form in the form of magic reference (with '' Taken 'instead'; automatically add file auto_prepend_file = auto_append_prepend_file = auto_append_prepend_file = auto_APpend_prepend_file = auto_APpend_prepend_file = auto_APpend_prepend_file = auto_APpend_prepend_file = Auto_APpend_prepend_file = Auto_Append_Prepend, PHP is always in the "Content-Type:" header output a character. Coding method. To make the output character set, as long as the setting is empty. PHP's built-in default value is text / htmldefault_mimetype = "text / html"; default_charset = "ISO-8859-1" ;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;; include_path =; incrude path setting, UNIX: "/ path1: / path2" Windows: "/ Path1; / path2" DOC_ROOT =; the root path of the PHP page, only in non-empty time_dir =; inform PHP, in this directory when using / ~ username to open the script, it is looking for, only in non-empty time; UPLOAD_TMP_DIR = The temporary directory (using the system default when not specified) UPLOAD_MAX_FILESIZE = 2097152; file upload is limited to 2 meg extension_dir = c: / pHP /; stored expansion library (module) Directory enable_dl = ON; whether DL () is effective.

The DL () function * cannot be worked in a multi-thread server, for example, IIS or Zeus, and it is disabled in it ;;;;;;;;;;;;;;; File UPLOADS ;;;;;;;;;;;;;;, (UPLOAD_TMP_DIR =; UPLOAD_MAX_FILESIZE for UPLOAD_TMP_DIR =; UPLOAD_MAX_FILESIZE = 2M; maximum license size for uploading file; fopen wrappers ;;;;;;;;;;;;;;;; allow_url_fopen = ON; whether to use URLS as http: .. or file FTP: ... ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;; If you want an extension library to be automatically loaded, use the following syntax:; extension = modulename.extension; for example, in Windows,; extension = msql.dll; OR under Unix, = Msql.so; Note that this should only be the name of the module, and do not require directory information. The location of the specified expansion library is indicated by the above extension_dir. ; Windows extension; extension = php_nsmail.dllextension = php_calendar.dll; extension = php_dbase.dll; extension = php_filepro.dllextension = php_gd.dll; extension = php_dbm.dll; extension = php_mssql.dll; extension = php_zlib.dll; extension = PHP_FILEPRO.DLL; extension = php_imap4r2.dll; extension = php_ldap.dll; extension = php_crypt.dll; extension = php_msql2.dll; extension = php_odbc.dll; Note, MySQL support is now built, so it is not necessary Its DLL ;;;;;;;;;;;;; module set ;;; module settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [Syslog] define_syslog_variables = OFF; whether various system log variables are defined; such as $ log_pid, $ log_cron, and so on. It is a good idea to turn off it is an improvement. When running, you can call the function define_syslog_variables () to define these variables [Mail function] SMTP = localhost; only for Win32 system sendmail_from = me@localhost.com; only for Win32 system; sendmail_path =; for UNIX It is also possible to support parameters (default is 'sendmail -t -i') [debugger] debugger.host = localhostdebugger.port = 7869debugger.enabled = false [logging]; these configurations indicate logging mechanisms for example.

See Examples / Readme.Logging to get more explanation; logging.method = db; logging.directory = /Path/to/log/directory[java]ager ./va.class.path = ./php_java.jar;java. Home = c: / jdk; java.library = c: /jdk/jre/bin/Hotspot/jvm.dll; java.library.path = ./[sql]sql.safe_mode = OFF [odbc]; u 4bc.default_db = Not yet implemented; uodbc.default_user = Not yet implemented; uodbc.default_pw = Not yet implementeduodbc.allow_persistent = on; allow or prevent persistent connections uodbc.check_persistent = on; connection is also used in the reuse uodbc.max_persistent = -1 before the test; The maximum number of persistent connections. -1 represents unlimited uodbc.max_links = -1; the maximum number of connections (lasting and non-persistent). -1 represents unlimited uodbc.defaultlrl = 4096; controlling the field of the long type. Returns the number of bytes of variables, 0 represents pass (?) 0 means passthruuodbc.defaultbinmode = 1; control binary data. 0 represents ????? Handling of binary data. 0 means passthru, 1 Return AS, 2 Convert to char; see the documentation about ODBC_BINMODE and ODBC_LONGREADLEN to obtain Uodbc.defaultlrl and u 4bc.defaultbinmode explanation. [Mysql] mysql.allow_persistent = ON; Allow or prohibit long-lasting connection mysql.max_persistent = -1; the maximum number of persistent connections. -1 represents no limit mysql.max_links = -1; the maximum number of connections (lasting and non-persistent). -1 represents unlimited mysql.default_port =; mysql_connect () uses the default port, if not set, mysql_connect (); use variable $ mysql_tcp_port, or MySQL-TCP entry (UNIX) under / etc / services ,; or In compilation is the defined mysql_port (in such order); Win32 environment will only check mysql_port. MySQL.DEFAULT_SOCKET =; the default socket name for local MySQL connections.

When it is empty, use the MySQL built-worth mysql.default_host =; mysql_connect () The host (secure mode is invalid) mysql.default_user =; mysql_connect () default username (safe mode is invalid) mysql.default_password =; MySQL_Connect () The password used by default (invalid in security mode); note that the password in this file is usually a * bad * idea; * Any * You can use the user who can use PHP access; 'Echo cfg_get_parsword ") 'To display that password! And of course, any user with the power of reading the file can also see that password. [msql] msql.allow_persistent = ON; Allow or prohibit long-lasting connection msql.max_persistent = -1; the maximum number of persistent connections. -1 represents unlimited msql.max_links = -1; the maximum number of connections (lasting and non-persistent). -1 represents unlimited [postgressql] pgsql.allow_persistent = ON; Allow or prohibit long-lasting connection pgsql.max_Persistent = -1; maximum number of persistent connections. -1 represents unlimited pgsql.max_links = -1; the maximum number of connections (lasting and non-persistent). -1 represents unlimited [Sybase] sybase.allow_persistent = on; Allow or prohibit long-lasting connection sybase.max_persistent = -1; the maximum number of persistent connections. -1 represents unlimited Sybase.max_links = -1; the maximum number of connections (lasting and non-persistent). -1 represents unlimited; sybase.interface_file = "/usr/sybase/interfaces" sybase.min_error_severity = 10; displayed error minimum severity sybase.min_message_severity = 10; the lowest importance of messages displayed Sybase.compataBility_Mode = Off; Compatible with the old version of PHP 3.0. If open, this will cause PHP automatically; give them the Sybase type according to the results, and not to all the strings. This compatibility pattern will not stay forever, therefore, make your code need modifications, and turn the item. [Sybase-CT] sybct.allow_persistent = ON; Allow or prohibit the lasting connection sybct.max_persistent = -1; the maximum number of persistent connections. -1 represents unlimited sybct.max_links = -1; the maximum number of connections (lasting and non-persistent).

-1 represents unlimited sybct.min_server_severity = 10; the lowest severity of the displayed error Sybct.min_client_severity = 10; the lowest importance of the message displayed [bcmath] bcmath.scale = 0; 10 decimal number for all bcmath functions number number of decimal digits for all bcmath functions [browscap]; browscap = extra / browscap.inibrowscap = C: /WIN/SYSTEM/inetsrv/browscap.ini [Informix] ifx.default_host =; ifx_connect () using default host (Invalid mode is invalid) ifx.default_user =; ifx_connect () default username (in safe mode) ifx.default_password =; ifx_connect () default password (safe mode) ifX.allow_persistent = ON; allow Or prohibit lasting connection ifx.max_persistent = -1; the maximum number of persistent connections. -1 represents unlimited IFX.MAX_LINKS = -1; the maximum number of connections (lasting and non-persistent). -1 represents unlimited IFX.Textasvarchar = 0; if open, the SELECT status returns the content of a 'text blob' field, not its idiFX.Byteasvarchar = 0; if open, the SELECT state returns a 'Byte blob' field The content, not its idiFX.Charasvarchar = 0; track spaces that are stripped from the fixed length character column. The Informix SE user may be valid. Ifx.blobinfile = 0; if the contents of the text and byte blobs are exported to a file; instead of saving to memory. ifx.nullformat = 0; NULL (empty) is returned as a null field, unless it is set here. In this case (1), NULL is returned as a string null. [Session] session.save_handler = files; Control mode for saving / retrieving data session.save_path = c: / win / temp; parameters to the controller when Save_Handler is set to file, 3; this is the data file Save the path. Session.use_cookies = 1; Whether to use cookiessession.name = phpsessid; use the name of the session in cookie session.Auto_start = 0; initialize sessionations.cookie_lifetime = 0 at the time of the request startup; Or 0, until the browser is restarted in session.cookie_path = /; cookie's effective path session.cookie_domain =; cookie's valid domain session.serialize_handler = php; Controller for connecting data; PHP is the standard controller of PHP . Session.gc_probability = 1; Press the percentage 'Garbage Collection' process; the possibility of starting at each session initialization.

Session.gc_maxlifetime = 1440; After the number of seconds referred to here, the saved data will be considered; 'Debris (Garbage) and is cleaned up by the GC process. Session.referr_check =; Check the HTTP reference to make the additional Ids in the URLS invalid session.Entropy_Length = 0; read how many bytes session.entropy_file =; specify here to establish a session ID; session.entropy_length = 16; session.Ntropy_length = 16; .NTropy_File = /dev/urandomsession.cache_limiter = nocache; set to {nocache, private, public} to determine HTTP; cache problem session.cache_expire = 180; Document is over time after N minutes session.use_trans_sid = 1; use transitionality Sid support, if compiled; --Nable-trans-limited_rewriter.tags = "a = href, area = href, frame = src, input = src, form = fakentry" [mssql]; extension = php_mssql.dllmssql . allowed or prohibited from continuous connection MSSQL.max_Persistent = -1; the maximum number of persistent connections. -1 represents unlimited mssql.max_links = -1; the maximum number of connections (lasting and non-persistent). -1 represents unlimited mssql.min_error_severity = 10; the displayed error minimum severity mssql.min_message_severity = 10; the lowest importance of the message display MSSQL.comPATABILITY_MODE = OFF; compatible with the old version of PHP 3.0. Mode. [Assertion];? ? ? ? ? Assert.Active = ON;? Assert (expr); active by default; assert.warning = on; Issue a php warning for each failed assert.; assert.bail = OFF; don't bail out by default.; assert.callback = 0; user-function to be called if an assertion fails;. assert.quiet_eval = 0;. eval the expression with current error_reporting () set to true if you want error_reporting (0) around the eval () [Ingres II] ii.allow_persistent = On;. allow Or prohibit lasting connection II.max_Persistent = -1; the maximum number of persistent connections. -1 represents unlimited II.max_links = -1; the maximum number of connections (lasting and non-persistent).

转载请注明原文地址:https://www.9cbs.com/read-6865.html

New Post(0)