[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 effective digits when the floating point type
Y2K_compliance = OFF
Whether to open 2000 adaptation (may result in problems in a browser adaptable in non-Y2K) 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 it can be
Accompiled things to work. highlight.string = # DD0000 highlight.comment = # FF8000 highlight.keyword = # 007700 highlight.bg = #FFFFFF highlight.default = # 0000BB highlight.html = # 000000; Misc miscellaneous expose_php = Off; decide whether to mark it in PHP The facts on the server (for example: adding on it - php- to web services; on the signal sent). (I personally comment, when there is a Power-by HEADER, turn this off.); It does not have a security threat, but it makes it possible to check if PHP is installed on your server. ;;;;;;;;;;;;;;;;;; ;;;;;;;;;;; max_execution_time = 30; each script Maximum execution time, at seconds, Memory_Limit = 8388608; a total amount of memory available (8MB here) (here is 8MB) ;;;;;;;;;;;;;;;;;;;;;;;; ;;;;; error ;; error control and registration ;;;;;;;;;;;;;;;;;;; error report Bit. Or add a number to get the desired error report level. ; E_ALL - All errors and warnings; E_ERROR - Fatness running error; e_warning - runtime warning (non-poor misalignment); E_PARSE - Compile error; E_NOTICE - Running (these often is your code) BUG is caused; it may also be caused by intentional behavior. (eg, based on unin-initialized variables to one; empty string's facts, using an uninitialized variable); E_CORE_ERROR - initialization process during PHP startup The fatal error of E_CORE_WARNING - A warning (non-poor fault) during the initialization process occurs during PHP; E_Compile_Error-Compile-compiled fatal fault; e_compile_warning - compile warning (non-poor mistake); E_USER_ERROR - User generated error Message; E_USER_WARNING - Warning message generated; E_USER_NOTICE - The user generated alert message; example: error_reporting = e_all & ~ e_notice; display all errors & ~ E_notice; show all errors, except for display_errors = on; display error message (as part of the output); on the final released Web site, it is strongly recommended that you turn off this feature and use; error log replacement (see Next). In the final released Web site continues to make Display_ERRORS valid; exposing some information about security, such as file paths on your web service,; your database planning or other information. Display_startup_errors = Off; or even DISPLAY_ERROES Open, in the step of starting in PHP; error will not be displayed.; Strongly recommended to keep display_startup_errors to close, except for the wrong process.
Log_ERRORS = OFF; record errors in the log file (the server specified by the server, STDERR standard error output, or error_log)); as in the above description, it is highly recommended that you have a logging error in the finally released Web site; replace Direct error output. TRACK_ERRORS = OFF; save the most recent error / warning message in the variable $ php_errorsg (boolean); error_prepend_string = ""; error_append_string = ""; Error_Append_string = ""; String output after the error message; error_log = filename Record the 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; when the ' ' is used for strings ;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;; variables_order = "egpcs"; this instruction 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 even more meaningful to TRACK_VARS - so that 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 array, ARGC is variable); (which 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 quotes magic_quotes_gpc = ON; use magic reference in GET / POST / COOKIE data; (in this way, huh, the so-called Magic Quotes should refer to control characters with escape values, such as'. ...) Magic_quotes_Runtime = Off; uses the data generated at runtime Use the magic reference, for example: data obtained with the SQL query, with the data obtained with the exec () function, etc. Magic_quotes_sybase = off; use the Sybase form in the form of magic reference ( Use '' discrimination 'without "); 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. To make the output character set, as long as the setting is empty. PHP's built-in default value is text / html default_mimetype = "text / html"; default_charset = "ISO-8859-1" ;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;; 【_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 opens the script, only in non-empty time; UPLOAD_TMP_DIR =; Temporary directory (using the system default when not specified) UPLOAD_MAX_FILESIZE = 2097152; file upload is limited to 2 meg extension_dir = c: / pHP /; store the loadable expansion library (module) The directory enable_dl = ON; whether DL () is effective.
DL () function * on multi-threaded server * cannot be * good work, for example IIS or Zeus, and it is disabled in it ;;;;;;;;;;;;;;; File UPLOADS; ;;;;;;;;;;;;;;, file_uploads = on; HTTP mode file is allowed to upload; UPLOAD_TMP_DIR =; temporary directory for files used for HTTP (not specified) UPLOAD_MAX_FILESIZE = 2M; maximum license size for uploading file ;;;;;;;;;;;;;;;;;; allow_url_fopen = ON; whether to allow URLs as http: .. or FTP: ... ;;;;;;;;;;;;; dynamic expansion; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;; If you want an extension library to be automatically loaded, use the following syntax:; extension = modulename.extension; for example, on 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.dll extension = php_calendar.dll; extension = php_dbase.dll; extension = php_filepro.dll extension = 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-in, therefore, not Need to use its DLL ;;;;;;;;;;;;;;;;;;; module setting; 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 = localhost debugger.port = 7869 debugger.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]; java.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 implemented uodbc.allow_persistent = on; allow or prevent persistent connections uodbc.check_persistent = on; reuse before checking whether the connection can also be used uodbc.max_persistent = -1 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 passthru uodbc.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 it is not set, mysql_connect (); use variable $ mysql_tcp_port, or mysql-TCP entry 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; the shortest severity of the displayed error Sybase.min_Message_Severity = 10; the lowest importance of the message 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.ini browscap = C: /WIN/SYSTEM/inetsrv/browscap.ini [Informix] ifx.default_host =; use ifx_connect () default Host (safe mode) ifx.default_user =; ifx_connect () default username (safe mode is invalid) ifx.default_password =; ifx_connect () The password used by default (safe mode is invalid) ifX.Allow_Persistent = ON; Allow or prohibit the 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 id.byteasvarchar = 0; if open, the SELECT status returns a 'Byte Blob' The content of the field is instead of its ID ifx.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 passing to the controller when Save_Handler is set to file,; this is the data file will be saved route of. Session.use_cookies = 1; Whether to use cookies session.name = phpsessid; use session.Auto_Start = 0 with session in cookie; initialize session session.cookie_lifetime = 0 at the request startup; , When 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 for PHP Controller.
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 / urandom session.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 transition Sex SID support, if compiled; --Nable-trans-sid url_rewriter.tags = "a = href, area = href, frame = src, input = src, form = fakeTry" [MSSQL]; extension = php_mssql .dll mssql.allow_persistent = on; Allow or prohibit long-lasting 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).