Highly recommended: php.ini Chinese version (1) _php Foundation

Source: Internet
Author: User
Tags bitwise bitwise operators error handling flush parse error syslog system log zend

[PHP]
; PHP is still an evolving tool, and its functionality is constantly being pruned
; and PHP.ini's setting changes can reflect quite a change,
; Before using the new PHP version, it would be helpful to look at the php.ini.

;;;;;;;;;;;;;;;;;;;
; about 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 specified path, 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 start line is simply ignored (as you might
; guessed). Chapter headings (For example: [Foo]) are also simply ignored, even though they may
; Have some kind of meaning.

; Indicates that the following syntax is specified:
; 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 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 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 a state that has a value of 0, off, False, or No.

; An empty string can be represented by an equal sign without writing anything, 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, or
; Zend extension), you can only transfer these extended rows * and use these constants.

; All the values set in the Php.ini-dist file are the same as the built-in defaults (which is to say that if the 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 <%%> tags
Precision = 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 body content 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 the 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 close this option and confirm that your script is still working to ensure that in future versions of the language
; They can still work. (You will get a warning each time you use this feature, and the parameters 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 indication contains a comma-delimited list of prefixes. In Safe mode, users 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_, (such as: 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 = #DD0000
Highlight.comment = #FF8000
Highlight.keyword = #007700
highlight.bg = #FFFFFF
Highlight.default = #0000BB
highlight.html = #000000

; Misc Miscellaneous
expose_php = Off
; Decide whether PHP will indicate the fact that it's installed on the server (for example: add it to the-php-Web service
; 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 (this is 8M



; 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,
; it could be a deliberate act. (such as: Automatically initialize an uninitialized variable to a
; the fact of an empty string uses an uninitialized variable)

; E_core_error-fatal error occurred during initialization of PHP
; E_core_warning-Warning (non-fatal error) during initialization during PHP startup
; E_compile_error-Compile-time fatal error
; E_compile_warning-compile-time warnings (non-fatal errors)
; E_user_error-user-generated error message
; E_user_warning-User generated warning message
; E_user_notice-User Generated reminder message
; Example:
; error_reporting = E_all & ~e_notice; 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 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).
; Continue to make display_errors available on the final published Web site
; 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 Display_erroes is turned on, it happens in the steps of starting PHP
; Errors 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; Error logging in 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 direct error output.

Track_errors = off; Save last Error/warning message in 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; Logging error log in specified file
; error_log = syslog; Logging error log 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 referenced in the form of 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.
; You might want to close the user's data if you don't want it to clutter up the global scope.
; 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.
(Source: Day-poor birds)

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.