Chinese PHP is also a continuous development of tools, its function is still constantly cut; and php.ini settings change can reflect a considerable change; Before using the new PHP version, it would be helpful to look at the php.ini.
;;;;;;;;;;;;;;;;;;;; In relation to this document;;;;;;;;;;;;;;;;;;;;;;;;;
; This file controls many aspects of PHP's perspective. In order for PHP to read this file, it must be named; ' PHP.ini '. PHP will locate the file in turn: current working directory; environment variable PHPRC; The path indicated, the path specified at compile time.; Under Windows, the path at compile time is the Windows installation directory.; In command line mode, the php.ini lookup path can be replaced with the-c parameter.
; The syntax for this file is very simple. Blank character and semicolon '; ' The beginning line is simply ignored (as you might; guessed). Chapter headings (For example: [Foo]) are also simply ignored, even if they are possible in the future; Have a certain meaning.;; Instruction is specified with the following syntax:; Indicates an identifier = value; directive = value; Indicates that the 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), and an INI constant; One (on, off, True, False, Yes, No and None), or an expression; (such as: E_all & ~e_notice), or a string enclosed in quotes ("foo"). INI file is limited to bitwise operators and parentheses.; | Bitwise OR; & Bitwise AND; ~ Bitwise NOT;! Boolean not;; Boolean flags can be placed in the open state with 1, on, True or Yes. They can be placed on the state of 0, off, False or No.; An empty string can be expressed by not writing anything after the equals sign, or with the None keyword:;; Foo =; Place Foo as an empty string; foo = none; Place Foo as an empty string; Foo = "None"; Place Foo As String ' None ';; If you use constants in your value settings, these constants belong to the extended libraries that are dynamically transferred (not PHP extensions; Zend extension), you can only transfer these extended rows * using these constants. All the values set in the Php.ini-dist file are the same as the built-in defaults (which is to say, if php.ini; is not used or you have deleted these lines, the default value is the same.
;;;;;;;;;;;;;;;;;;;;; Language options;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
engine = on; Make PHP scripting language engine (PHP scripting language Engine) valid under Apache. Short_open_tag = on; Let's do it. Identification (this simple representation). Otherwise only <?php and <script> tags will be identified. Asp_tags = off; Allow Asp-style <%%> tagsprecision = 14; Number of significant digits when the number of floating-point types is displayed
Y2k_compliance = off; Whether to open the 2000 adaptation (may cause problems in a Y2K-adapted browser)
output_buffering = off; Output caching allows you to even send headers (headers, including cookies) after the text is exported; The cost is that the output layer slows down a little bit. You can use the output cache to open the output cache at run time; or set the indication here to on so that the output cache for all files is open. Output_handler =; You can redirect all output of your script to a function; Doing so may be useful for processing or logging it.; For example, if you set this output_handler as "Ob_gzhandler", The output is transparently compressed for browsers that support gzip or deflate encoding.; Set an output processor to automatically open the output buffer.
Implicit_flush = off; Force flush (refresh) 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 each print () or echo () call and each HTML block. Opening this setting can cause serious run-time conflicts and is recommended for opening only during Debug.
Allow_call_time_pass_reference = on; Whether to pass arguments by reference when forcing a function call. This approach has been protested; and may no longer be supported in future versions of Php/zend.; The method that is encouraged to specify which parameters are passed by reference is in the function declaration.; You are encouraged to try to turn off this option and confirm that your script is still working to ensure that in a future version of the language; They can still work. (You will get a warning each time you use the feature, and the parameters will be by value rather than by reference;) Delivery).
; Safe Mode Safe_mode = Offsafe_mode_exec_dir =safe_mode_allowed_env_vars = php_;? Setting certain environment variables;? May is a potential security breach.; The indication contains a comma-delimited list of prefixes. In safe mode, the user can only replace; The value of the environment variable that starts with the prefix listed here.; By default, users will only be able to set environment variables that start with php_ (e.g. Php_foo=bar).; Note: If this indicator is empty, PHP will let the user change any environment variable!
Safe_mode_protected_env_vars = Ld_library_path; This instruction contains a comma-delimited list of environment variables that the end user will not be able to change with putenv ().; These variables are even protected when the Safe_mode_allowed_env_vars is set to allow.
Disable_functions =; This instruction allows you to invalidate a particular function for security reasons. It accepts a comma-delimited list of function names. This indication * is not affected by whether the Safe mode is open.
; Syntax highlighting mode of color.; As long as you can be <font color=??? > Accept things to work.
highlight.string = #DD0000highlight. Comment = #FF8000highlight. keyword = #007700highlight. BG = # Ffffffhighlight.default = #0000BBhighlight. html = #000000
; Misc Miscellaneous expose_php = off; Decide whether PHP will indicate the fact that it is installed on the server (for example, add it to the Web service-php-); sent on the signal).; (My personal opinion, in the presence of what power-by header, turn this 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 for each script, in seconds memory_limit = 8388608; The maximum amount of memory a script can use (here is 8MB)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Error handling and logging;; Error control and registration;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; The error report is bitwise. Or add up the numbers to get the error reporting level you want. E_all-all errors and warnings; E_error-Fatal run-time error; E_warning-Runtime Warning (non-fatal error); E_parse-Compile-time parse error; E_notice-Run-time Reminders (these are often caused by bugs in your code; or it may be intentional behavior). (for example, an uninitialized variable is automatically initialized to a fact based on an uninitialized variable)
; E_core_error-fatal error occurred during initialization of PHP at startup; E_core_warning-A warning (non-fatal error) that occurs during initialization of the PHP startup; E_compile_error-Compile-time fatal error; E_compile_warning-Compile-time warning (non-fatal error); E_user_error-error message generated by the user; E_user_warning-User generated warning message; E_user_notice-User generated reminder message; Example:; error_reporting = E_all & ~e_notice; Show all errors except reminders; error_reporting = e_compile_error| e_error| E_core_error; Show only Error error_reporting = E_all & ~e_notice; Show all errors except reminders display_errors = on; Displays an error message (as part of the output); In the final release of the Web site, it is strongly recommended that you turn off this feature and use; Error log instead (see below).; In the final release of the Web site to continue to make display_errors effective and possible; Expose some security-related information, such as the file path on your Web service; Your database planning or other information. Display_startup_errors = off; Even when the display_erroes is turned on, it happens in the steps of the PHP startup; Error will not be displayed.; It is strongly recommended that the display_startup_errors be kept closed; Except in the process of error modification. Log_errors = off; Record errors in the log file (server-specified log, stderr standard error output, or Error_log (below)); As explained above, it is strongly recommended that you log errors in the final published Web site, instead of the direct error output.
Track_errors = off; Save the last Error/warning message in the variable $php _errormsg (boolean); error_prepend_string = "<font color=ff0000>"; The string to output before the error message; error_append_string = "</font>"; The string to output after the error message; error_log = filename; Logs error log to specified file; error_log = syslog; Log error logs in System log syslog (event log under NT, invalid under Windows 95) warn_plus_overloading = off; Warning when ' + ' is used for string
;;;;;;;;;;;;;;;;;; Data handling;;;;;;;;;;;; Variables_order = "Egpcs"; This instruction describes the PHP record; Get, POST, Cookie, environment and built-in the order of these variables.; (G, P, C, E & S, usually referred to as egpcs or GPC).; Record from left to right and the new value replaces the old value.
Register_globals = on; Whether to register these egpcs variables as global variables.; If you don't want the user data to be out of the global mess, you might want to close it. It's more meaningful to connect with track_vars-so you can pass; $HTTP _*_vars[] Array to access all GPC variables.
REGISTER_ARGC_ARGV = on; This instruction tells PHP whether to declare argv and ARGC variables; (Note: Here argv is an array, ARGC is a variable number); (which contains data from the Get method).; If you don't want to use these variables, you should turn it off to improve performance.
Track_vars = on; Make $http_*_vars[] Array valid, here * in use; ENV, POST, GET, COOKIE or server replacement post_max_size = 8M; The maximum size of post data that PHP will accept.
Gpc_order = "GPC"; The instruction was objected to. Replace with Variables_order.
; Magic QUOTESMAGIC_QUOTES_GPC = on; Using magic references in the input Get/post/cookie data; (In this way, hehe, the so-called magic quotes should mean to use the escape alphanumeric in the reference control characters, such as \ ' ... ) magic_quotes_runtime= off; Using magic references to data generated at run time; For example: The data obtained with SQL query, the data obtained by the EXEC () function, and so on magic_quotes_sybase = off; Using Sybase-style magic quotes (with ' prolapse ' instead of \ ')
; Automatically add files before and after PHP documents auto_prepend_file =auto_append_file =
; Like 4.04b4, PHP always prints the encoding of a character in the "Content-type:" header by default. Invalidates the output character set as long as it is set to null.; PHP's built-in default value is Text/htmldefault_mimetype = "text/html";d efault_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, which is valid only when non-null User_dir =; Tell PHP which directory to look for when using/~username to open the script, only when it is not empty; Upload_tmp_dir =; A temporary directory containing files uploaded with the HTTP protocol (using system default when unspecified) upload_max_filesize = 2097152; File uploads are limited by default to 2 Meg extension_dir = c:\php\; Directory enable_dl = On for the loadable Extension Library (module); Whether the DL () is valid.; DL () function on multi-threaded server * cannot work well; For example, IIS or Zeus, and on it, defaults to prohibit
;;;;;;;;;;;;;;;;; File uploads;;;;;;;;;;; File_uploads = on; Whether to allow HTTP way file upload; Upload_tmp_dir =; Temporary directory for files used for HTTP uploads (unspecified to use system default) Upload_max_filesize = 2M; Maximum allowable size of uploaded files
; Fopen wrappers;;;;;;;;;;;;; Allow_url_fopen = on; Do you want to allow URLs to be treated as http:.. or the file as ftp: ...
;;;;;;;;;;;;;;;;;;;;;;; dynamic expansion;; 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; extension=msql.so; Note that this should only be the name of the module, without the need for directory information to be placed inside. Use the above Extension_dir to indicate the location of the specified extension library.
; Windows extensions; 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 that MySQL support is now built in and therefore does not need to use its DLL
;;;;;;;;;;;;;;;;;;;; module setting;; 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 improve efficiency. At run time, 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 =; only for UNIX, but also for parameters (the default is ' SendMail -t-i ')
[debugger]debugger.host = Localhostdebugger.port = 7869debugger.enabled = False
[Logging]; These configurations indicate the logging mechanism used for the sample.; See Examples/readme.logging to get more explanations; 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];uodbc.default_db = not yet implemented;uodbc.default_user = not yet IMPLEMENTED;UODBC.DEFAULT_PW = not yet implemen Teduodbc.allow_persistent = on; Allow or disallow persistent connections uodbc.check_persistent = on; Check if the connection is still available before reuse uodbc.max_persistent =-1; The maximum number of persistent connections. -1 represents unrestricted uodbc.max_links =-1; Maximum number of connections (persistent and non-persistent). -1 represents unrestricted UODBC.DEFAULTLRL = 4096; Controls a LONG type of field. Returns the number of bytes in the variable, and 0 represents the pass (? ) 0 means passthruuodbc.defaultbinmode = 1; Controls binary data. 0 represents????? Handling of binary data. 0 means passthru, 1 return as are, 2 convert to char; See the documentation for Odbc_binmode and Odbc_longreadlen for UODBC.DEFAULTLRL and uodbc.defaultbinmode explanations.
[mysql]mysql.allow_persistent = on; Allow or prohibit persistent connections mysql.max_persistent =-1; The maximum number of persistent connections. -1 represents unrestricted mysql.max_links =-1; Maximum number of connections (persistent and non-persistent). -1 represents unrestricted Mysql.default_port =; Mysql_connect () Use the default port, if not set, mysql_connect (); will use variables $MYSQL _tcp_port, or mysql-tcp Entries (Unix) under/etc/services; Or in the compilation is defined by the Mysql_port (in this order); Win32 environment, only mysql_port will be checked. Mysql.default_socket =; The default socket name for the local MYSQL connection. NULL, using MYSQL built-in values
Mysql.default_host =; Mysql_connect () The host used by default (invalid in safe mode) Mysql.default_user =; Mysql_connect () The user name used by default (invalid in safe mode) Mysql.default_password =; mysql_connect () The password used by default (invalid in safe mode); Note that saving the password under this file is usually a * * * * * IDEA; * Any user can use PHP access can run; ' Echo cfg_get_var (' Mysql.default_password ') ' to show that password!; And of course, anyone who has the power to read the file can see the password.
[msql]msql.allow_persistent = on; Allow or prohibit persistent connections msql.max_persistent =-1; The maximum number of persistent connections. -1 represents unrestricted msql.max_links =-1; Maximum number of connections (persistent and non-persistent). -1 means no limit
[postgressql]pgsql.allow_persistent = on; Allow or prohibit persistent connections pgsql.max_persistent =-1; The maximum number of persistent connections. -1 represents unrestricted pgsql.max_links =-1; Maximum number of connections (persistent and non-persistent). -1 means no limit
[sybase]sybase.allow_persistent = on; Allow or prohibit persistent connections sybase.max_persistent =-1; The maximum number of persistent connections. -1 represents unrestricted sybase.max_links =-1; Maximum number of connections (persistent and non-persistent). -1 represents unrestricted; Sybase.interface_file = "/usr/sybase/interfaces" sybase.min_error_severity = 10; The minimum severity of the error shown is sybase.min_message_severity = 10; The lowest importance of the message displayed Sybase.compatability_mode = off; Compatible with the older version of PHP 3.0 mode. If opened, this will cause PHP to automatically; Giving them the Sybase type based on the results; Instead of taking them all as strings. This compatibility mode is not kept forever; So take your code and make the changes you need; and close the item.
[sybase-ct]sybct.allow_persistent = on; Allow or prohibit persistent connections sybct.max_persistent =-1; The maximum number of persistent connections. -1 represents unrestricted sybct.max_links =-1; Maximum number of connections (persistent and non-persistent). -1 represents unrestricted sybct.min_server_severity = 10; The minimum severity of the error shown is sybct.min_client_severity = 10; The lowest importance of the message displayed
[Bcmath]bcmath.scale = 0; Number of 100-binary digits used for all Bcmath functions 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 () The host used by default (invalid in safe mode) Ifx.default_user =; Ifx_connect () The user name used by default (invalid in safe mode) Ifx.default_password =; Ifx_connect () The password used by default (invalid in safe mode) ifx.allow_persistent = on; Allow or prohibit persistent connections ifx.max_persistent =-1; The maximum number of persistent connections. -1 represents unrestricted ifx.max_links =-1; Maximum number of connections (persistent and non-persistent). -1 represents unrestricted Ifx.textasvarchar = 0; If turned on, the Select status character returns the contents of a ' Text blob ' field, not its Idifx.byteasvarchar = 0; If turned on, the Select status character returns the contents of a ' byte blob ' field, not its Idifx.charasvarchar = 0; Tracks the space stripped from the fixed-length character Fulieri. may be valid for Informix SE users. Ifx.blobinfile = 0; If opened, the contents of text and byte blobs are exported to a file; Instead of saving it to memory. Ifx.nullformat = 0; Null (empty) is returned as an empty field, unless it is set to 1.; In this case (1), NULL is returned as a string null.
[Session]session.save_handler = files; The control method used to save/retrieve data Session.save_path = C:\win\temp; Passing parameters to the controller when Save_handler is set as a file; This is the path where the data file will be saved. Session.use_cookies = 1; Whether to use Cookiessession.name = PHPSESSID; The name of the session used in the cookie Session.auto_start = 0; Initialize Sessionsession.cookie_lifetime = 0 at request startup; The save time for the cookie in seconds; or 0 o'clock until the browser is restarted Session.cookie_path =/; Valid path of cookie Session.cookie_domain =; Valid domain Session.serialize_handler = php for cookies; A controller for connecting data; PHP is the standard controller for PHP. session.gc_probability = 1; A percentage of the ' garbage collection (defragmentation) ' process; The possibility of starting each session initialization. Session.gc_maxlifetime = 1440; After the number of seconds indicated here, the saved data will be considered; ' Fragmentation (garbage) ' and cleaned out by the GC process. Session.referer_check =; Check HTTP references so that additional IDs that are included in the URLs are invalid session.entropy_length = 0; How many bytes are read from the file Session.entropy_file =; Specifies that the session ID is established here; Session.entropy_length = 16; Session.entropy_file =/dev/urandomsession.cache_limiter = NoCache; Set to {nocache,private,public} to determine HTTP; Cache problem Session.cache_expire = 180; The document is obsolete after n minutes session.use_trans_sid = 1; Use transitional SID support, if compile-time permission; --eNable-trans-sidurl_rewriter.tags = "A=href,area=href,frame=src,input=src,form=fakeentry"
[mssql];extension=php_mssql.dllmssql.allow_persistent = on; Allow or prohibit persistent connections mssql.max_persistent =-1; The maximum number of persistent connections. -1 represents unrestricted mssql.max_links =-1; Maximum number of connections (persistent and non-persistent). -1 represents unrestricted mssql.min_error_severity = 10; The minimum severity of the error shown is mssql.min_message_severity = 10; The lowest importance of the message displayed Mssql.compatability_mode = off; Compatible with the older 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 assertion.; Assert.bail = off; Don ' t bail out by default.; Assert.callback = 0; User-function to is 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 persistent connections ii.max_persistent =-1; The maximum number of persistent connections. -1 represents unrestricted ii.max_links =-1; Maximum number of connections (persistent and non-persistent). -1 represents unrestricted ii.default_database =; Default database format: [node_id::]dbname[/srv_class]ii.default_user =; default Userii.default_password =; default password
[Verisign payflow pro]pfpro.defaulthost = "test.signio.com"; The default Signio server Pfpro.defaultport = 443; The default port for the connection pfpro.defaulttimeout = 30; Default timeout time in seconds
; Pfpro.proxyaddress =; The default proxy IP address (if required); Pfpro.proxyport =; The port of the default proxy; Pfpro.proxylogon =; The default proxy login (logon username); Pfpro.proxypassword =; Password for the default agent
[Sockets]sockets.use_system_read = on; Use the system's read () function instead of php_read () encapsulation; Local Variables: (locally variable); Tab-width:4; End:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.