PHP configuration file Detailed php.ini

Source: Internet
Author: User
Tags bitwise operators informix mssql session id sybase syslog system log zend

[PHP]; PHP is also a constantly evolving tool, and its functions are constantly being truncated; And PHP.ini's settings change can reflect a considerable change; Before using the new PHP version, it would be beneficial to study the php.ini.;;;;;;;;;;;;;;;;;;; ; In relation to the document;;;;;;;;;;;;;;;;;;;;;;;; This file controls many aspects of PHP's view. In order for PHP to read this file, it must be named; ' PHP.ini '. PHP will find the file in these places: current working directory; environment variable PHPRC; The path specified at compile time; Under Windows, the compile-time path is the Windows installation directory.; In command-line mode, the php.ini lookup path can be substituted with the-c parameter.; The syntax of the file is very simple. Blank characters and semicolons '; ' The starting line is simply ignored (as you may; guessed the same). Chapter headings (For example: [Foo]) are also simply ignored, even if they are possible in the future; There is a sense of some kind. The instruction is specified using the following syntax:; Indicates the identifier = value; directive = value; Indicates that the identifier is case-sensitive *-Foo=bar differs from foo = bar.; The value can be a string, a number, a PHP constant (such as: E_all or M_PI), in the 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 quotation marks ("foo"). ; ; INI file is limited to bitwise operators and parentheses.; | Bitwise OR; & Bitwise AND; ~ Bitwise NOT;! Boolean not;; The Boolean flag is available in 1, on, True or Yes, these values are placed in the open state.; They are available in 0, off, False or No These values are placed off the state.; An empty string can be used after the equals sign to not write anything to indicate, or use 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, and these constants belong to the extended library of dynamic push-in (not PHP extension, that is; Zend extension), you can only dial in these extended lines * after * use these constants.; All values set in the Php.ini-dist file are the same as the built-in default values (this is to say, if php.ini; is not used or you delete these lines, the default values are the same as the defaults.;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; language option;;;;;;;;;;;;;;;;;;;;;;;;;;; engine = on; Makes PHP scripting language engine (PHP scripting language Engine) valid under Apache. Short_open_tag = on; Allow tags to be recognized. Asp_tags = OFF; Allow Asp-style tags precision = 14; Number of significant digits when floating-point type is displayed y2k_compliance = OFF; Whether to open 2000 adaptation (possibly causing problems in non-Y2K adapted browsers) output_buffering = OFF; The output cache allows you to send the header (header, including cookies) line even after the output body content; 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; Alternatively, set the indicator to on to make the output cache for all files open. Output_handler =; You can redirect all the output of your script to a function; Doing so can be useful for processing or logging it with logging.; 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 turn on the output buffer. Implicit_flush = OFF; Forcing flush (refresh) allows PHP to tell the output layer to automatically refresh its 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 causes serious runtime conflicts and is recommended to be opened only during the debug process. Allow_call_time_pass_reference = on; Whether to allow arguments to be passed by reference when forcing a function call. This approach has been protested; and may no longer be supported in future versions of Php/zend.; Encouraged to specify which parameters are passed by reference in the function declaration.; You are encouraged to try to close this option and confirm that your script is still working to ensureIn a future version of the language; They can still work. (You will get a warning every time you use this feature, and the parameter will be by value instead of by reference;) Delivery).; Safe Mode Safe_mode = Off Safe_mode_exec_dir = Safe_mode_allowed_env_vars = Php_; Setting certain environment variables;? May is a potential security breach. ; The indicator contains a comma-delimited list of prefixes. In safe mode, the user can only be replaced; The value of the environment variable that begins with the prefix listed here.; By default, users will only be able to set environment variables that start with PHP_ (for example, Php_foo=bar).; Note: If this instruction 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 protected even 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 instruction * is not affected by * Safe mode is open.; The color of the syntax highlighting mode.; You can work as long as you can accept something. highlight.string = #DD0000 Highlight.comment = #FF8000 Highlight.keyword = #007700 highlight.bg = #FFFFFF Highlight.defaul t = #0000BB highlight.html = #000000; Misc Miscellaneous expose_php = Off; Decide whether PHP will indicate the fact that it is loaded on the server (for example: add it-php-to the Web service; On the signal sent).; (My personal opinion, in the presence of what power-by header, turn this off.) ) ; It will not be a security threat, but it makes it possible to check if PHP is installed on your server.;;;;;;;;;;;;;;;;;;;;;;;;; ; Resource Limits;;;;;;;;;;;;;;;;;;;;;;;; MAx_execution_time = 30; The maximum execution time per script, in seconds memory_limit = 8388608; The maximum amount of memory a script can use (this is 8MB);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Error handling and logging;; Error control and registration;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; The error report is bitwise. Or add up the numbers to get the error report 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 parsing error; E_notice-Runtime Reminders (these are often caused by bugs in your code, or intentional behavior). (for example, an uninitialized variable is automatically initialized based on an uninitialized variable), and the fact of an empty string is used; E_core_error-fatal error occurred during initialization of PHP startup; E_core_warning-A warning (non-fatal error) that occurs during initialization during 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-A 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 Errors error_reporting = E_all & ~e_notice; Show all errors except reminder display_errors = on; Displays the error message (as part of the output); On the final published Web site, it is strongly recommended that you turn off this feature and use it; Error log instead (see below).; Continue to make display_errors available in the final published Web site; Expose some information about security, such as the path to a file on your Web service; Your database planning or other information. display_sTartup_errors = OFF; Even when Display_erroes is open, it happens in PHP's start-up steps; The error will not be displayed.; It is strongly recommended to keep the display_startup_errors closed; In addition to the process of error-changing. Log_errors = OFF; Errors are logged 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 Web site, instead of the direct error output. Track_errors = OFF; Save the most recent error/warning message to the variable $php _errormsg (boolean); error_prepend_string = ""; The string to be output before the error message; error_append_string = ""; The string to output after the error message; error_log = filename; Logs the error log to the specified file; error_log = syslog; Logging error log in Syslog (NT event Log, Windows 95 not valid) warn_plus_overloading = OFF; When the ' + ' is used for a string warning;;;;;;;;;;;;;;;;;;;;; ; Data handling;;;;;;;;;;;;;;;;; Variables_order = "Egpcs"; This instruction describes the PHP record; GET, POST, Cookie, environment and built-in the order of these variables.; (represented by G, P, C, E & S, usually quoted as Egpcs or GPC).; The new value replaces the old value by a left-to-right record. Register_globals = on; Whether to register these egpcs variables as global variables.; If you don't want the user data to be out of scope, you might want to close it.; It's more meaningful to connect with track_vars-so you can get through; $HTTP _*_vars[] Array accesses all the 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 the number of variables); (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 replace 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 quotes MAGIC_QUOTES_GPC = on; Use the Magic reference in the input Get/post/cookie data; (This is the original, hehe, the so-called magic quotes should be used to escape multibyte in the quoted control characters, such as ' .... ) Magic_quotes_runtime= Off; Use magic references to data generated at run time; For example: Data obtained with SQL query, data obtained with the EXEC () function, etc. magic_quotes_sybase = Off; Use Sybase as a magic reference ("Out of the way" instead of "); Automatically add files before and after PHP documents auto_prepend_file = Auto_append_file =; Like 4.04B4, PHP defaults to the "Content-type:" header to output a character encoding.; Invalidates the output charset as long as it is set to null.; The built-in default value for PHP is text/html default_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, valid only when not empty user_dir =; Tell PHP which directory to look for when opening the script with/~username, only valid when not empty; Upload_tmp_dir =; Temporary directory for files uploaded with HTTP protocol (use system default when not specified) Upload_max_filesiZe = 2097152; File uploads are limited by default to 2 Meg extension_dir = c:\php\; The directory that holds the Loadable Expansion Library (module) ENABLE_DL = on; Whether to make DL () valid.; The DL () function on a multi-threaded server * does not work well; For example, IIS or Zeus, and on which the default is prohibited;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; File uploads;;;;;;;;;;;;;;;;; File_uploads = on; Whether HTTP mode file upload is allowed; upload_tmp_dir =; Temp directory for files uploaded by HTTP (use system default if unspecified) upload_max_filesize = 2M; Maximum license size for uploaded files; Fopen wrappers;;;;;;;;;;;;;;;;;;;;;;;;; Allow_url_fopen = on; Whether to allow URLs as http:. Or take 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 and does not require directory information to be placed inside.; Specify the location of the extension library with the Extension_dir indicated above.; 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 that MySQL support is now built in, 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 function Define_syslog_variables () to define these variables [mail function] SMTP = localhost; only for Win32 Systems Sendmail_from = [email  protected]; only for Win32 systems; sendmail_path =; for Unix only, also supports parameters (default is ' sendmail-t-i ') [Debugger] debugger.host = localhost Debugg Er.port = 7869 debugger.enabled = false[logging]; These configurations indicate the logging mechanism for the example.; 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.D EFAULT_PW = Not yet implemented Uodbc.allow_persistent = on; Allow or disallow persistent connections Uodbc.check_Persistent = on; Check if the connection is also available before reuse uodbc.max_persistent =-1; The maximum number of persistent connections. -1 stands for unrestricted uodbc.max_links =-1; The maximum number of connections (persistent and non-persistent). -1 stands for unrestricted uodbc.defaultlrl = 4096; Controls a field of type LONG. Returns the number of bytes of the variable, and 0 represents the pass (? ) 0 means passthru Uodbc.defaultbinmode = 1; Controls the binary data. 0 stands for????? 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 explanations of UODBC.DEFAULTLRL and Uodbc.defaultbinmode. [MySQL] mysql.allow_persistent = on; Allow or disallow persistent connection mysql.max_persistent =-1; The maximum number of persistent connections. -1 stands for unrestricted mysql.max_links =-1; The maximum number of connections (persistent and non-persistent). -1 stands for unrestricted mysql.default_port =; Mysql_connect () uses the default port, if not set, mysql_connect (); The variable will be used $MYSQL _tcp_port, or the Mysql-tcp entry (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, use MYSQL built-in value mysql.default_host =; Mysql_connect () default host used (invalid in safe mode) Mysql.default_user =; mysql_connect () User name (not valid in Safe mode) used by default Mysql.default_password =; mysql_connect () default password used (invalid in safe mode); Note that saving the password under this file is usually a * bad * masterMeaning * Any user who can access PHP will be able to run it; ' Echo cfg_get_var ("Mysql.default_password") ' to show that password!; And of course, any user who has read the file's power can see that password. [MSQL] msql.allow_persistent = on; Allow or disallow persistent connection msql.max_persistent =-1; The maximum number of persistent connections. -1 stands for unrestricted msql.max_links =-1; The maximum number of connections (persistent and non-persistent). -1 stands for no limit [postgressql] pgsql.allow_persistent = on; Allow or disallow persistent connection pgsql.max_persistent =-1; The maximum number of persistent connections. -1 stands for unrestricted pgsql.max_links =-1; The maximum number of connections (persistent and non-persistent). -1 means unrestricted [Sybase] sybase.allow_persistent = on; Allow or disallow persistent connection sybase.max_persistent =-1; The maximum number of persistent connections. -1 stands for unrestricted sybase.max_links =-1; The maximum number of connections (persistent and non-persistent). -1 means no limit; sybase.interface_file = "/usr/sybase/interfaces" sybase.min_error_severity = 10; The minimum severity of the error shown sybase.min_message_severity = 10; The minimum importance of the message displayed is Sybase.compatability_mode = OFF; Mode compatible with older versions of PHP 3.0. If open, this will cause PHP to automatically; Give them the type of Sybase based on the results; Instead of treating them all as strings.; This compatibility mode is not always kept; So, put your code in need of modification; and closes the item. [SYBASE-CT] sybct.allow_persistent = on; Allow or disallow persistent connection sybct.max_persistent =-1; The maximum number of persistent connections. -1 stands for unrestricted sybct.max_links =-1; The maximum number of connections (persistent and non-persistent). -1 stands for unrestricted Sybct.min_serVer_severity = 10; The minimum severity of the error shown sybct.min_client_severity = 10; Minimum importance of the displayed message [Bcmath] Bcmath.scale = 0; The number of number of 100 decimal digits used in all Bcmath functions is a number of decimal digits for all bcmath functions[browscap]; browscap = Extra/browscap.ini BROWSC AP = C:\WIN\SYSTEM\inetsrv\browscap.ini [Informix] ifx.default_host =; Ifx_connect () default host used (invalid in safe mode) Ifx.default_user =; Ifx_connect () User name (not valid in Safe mode) used by default Ifx.default_password =; Ifx_connect () default password used (invalid in safe mode) ifx.allow_persistent = on; Allow or disallow persistent connection ifx.max_persistent =-1; The maximum number of persistent connections. -1 stands for unrestricted ifx.max_links =-1; The maximum number of connections (persistent and non-persistent). -1 stands for unrestricted Ifx.textasvarchar = 0; If open, the Select State character returns the contents of a ' text blob ' field instead of its id ifx.byteasvarchar = 0; If open, the Select State character returns the contents of a ' byte blob ' field instead of its id ifx.charasvarchar = 0; Track the space stripped from the fixed-length word Fulieri.; may be valid for Informix SE users. Ifx.blobinfile = 0; If open, the contents of text and byte blobs are exported to a file; Instead of saving to memory. Ifx.nullformat = 0; Null (NULL) 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; control mode for saving/retrieving data Session.save_path = C:\win\temp ; The parameters that are passed to the controller when the Save_handler is set to a file; This is the path where the data file will be saved. Session.use_cookies = 1; Whether to use cookies session.name = PHPSESSID; The name of the session used in the cookie Session.auto_start = 0; Initialize session Session.cookie_lifetime = 0 at request startup; The time to save the cookie in seconds; or 0 o'clock, until the browser is restarted Session.cookie_path =/; Valid path of cookie Session.cookie_domain =; The valid domain of the cookie session.serialize_handler = PHP; The controller used to connect the data; PHP is the standard controller for PHP. session.gc_probability = 1; By percentage of the ' garbage collection (defragmentation) ' process; The possibility of starting each time the session is initialized. Session.gc_maxlifetime = 1440; After the number of seconds referred to here, the saved data will be considered; ' Fragment (garbage) ' and cleared by the GC process. Session.referer_check =; Check for HTTP references to invalidate IDs that are included in URLs 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/urandom Session.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 the transitional SID support, if it is licensed at compile time; --enable-trans-sid url_rewriter.tags = "A=href,area=href,frame=src,inpUt=src,form=fakeentry "[MSSQL]; Extension=php_mssql.dll mssql.allow_persistent = on; Allow or disallow persistent connection mssql.max_persistent =-1; The maximum number of persistent connections. -1 stands for unrestricted mssql.max_links =-1; The maximum number of connections (persistent and non-persistent). -1 stands for unrestricted mssql.min_error_severity = 10; The minimum severity of the error shown mssql.min_message_severity = 10; The minimum importance of the message displayed is Mssql.compatability_mode = OFF; Mode compatible with older versions of PHP 3.0. [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 disallow persistent connection ii.max_persistent =-1; The maximum number of persistent connections. -1 stands for unrestricted ii.max_links =-1; The maximum number of connections (persistent and non-persistent). -1 stands for unrestricted ii.default_database =; Default database (format: [node_id::]dbname[/srv_class] ii.default_user =; Default User Ii.default_password =; Default Password[verisign payflow Pro] pfpro.defaulthost = "test.signio.com"; The default Signio server Pfpro.defaultport = 443; Default port for connection pfpro.defaulttimeout = 30; Default time-out by seconds; Pfpro.proxyaddress =; The IP address of the default proxy (if required); Pfpro.proxyport =; The port of the default proxy; Pfpro.proxylogon =; The default proxy login (logon username); Pfpro.proxypassword =; The default proxy password [Sockets] sockets.use_system_read = on; Replace the Php_read () package with the Read () function of the system; Local Variables: (locally variable); Tab-width:4; End

  

PHP configuration file Detailed php.ini

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.