[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. The rows that are blank characters and semicolons / '; /' 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 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 to 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
(If this is OFF, you can solve it in the program)
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 accepted.
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 memory of a script (here 8MB)
;;;;;;;;;;;;;;;;;;;;;;;;;;
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)
(If this is ON, then there is no variable on the page will also be reported. So you can write a row in the program: Error_Reporting (7); or use isset or empty when POST, Get variables
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 explained above, it is highly recommended that you have a logging error in the final 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 = / "/"; the 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; make $ http _ * _ vars [] array valid, here * is used in use
ENV, Post, Get, Cookie or Server Replacement
POST_MAX_SIZE = 8m; PHP will accept the maximum size of POST data.
GPC_ORDER = / "GPC /"; this indication is opposed. Use Variables_Order instead.
Magic quotes
Magic_quotes_GPC = ON; use magic references in the input GET / POST / COOKIE data
(In this way, huh, huh, the so-called MAGIC quotes should refer to control characters that use escape characters in the quotes, such as / '....)
Magic_quotes_Runtime = OFF; using the data generated at runtime using a magic reference,
For example: data obtained with SQL queries, with the data obtained with the exec () function, etc.
Magic_quotes_sybase = OFF; uses a magic reference in Sybase form (discrimination with / '/' / 'without using /')
; Automatically add files before and after PHP documentation
Auto_prepend_file = auto_append_file =
Like 4.04B4, PHP is always encoded by default in the "Content-Type:" header.
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 /"
;;;;;;;;;;;;;;;;;;;;;;;;;
Paths and Directories;
;;;;;;;;;;;;;;;;;;;;;;;;;
INCLUDE_PATH =; Include Path Setting, Unix: / "/ Path1: / Path2 /" Windows: / "// Path1; // Path2 /"
Doc_root =; the root path of the PHP page, only is valid when non-empty
User_dir =; Inform PHP Which directory is to find when using / ~ username opens the script, only in non-empty
UPLOAD_TMP_DIR =; Temporary directory for files uploaded with HTTP protocols (using the system default when not specified)
UPLOAD_MAX_FILESIZE = 2097152; file upload default to 2 meg
EXTENSION_DIR = C: // PHP //; Store the directory of the loadable expansion library (module)
Enable_dl = ON; whether DL () is enabled.
; DL () functions on multi-threaded server * cannot be worked well,
For example, IIS or Zeus, and it is disabled by it.
;;;;;;;;;;;;;;;;
File Uploads;
;;;;;;;;;;;;;;;;
File_uploads = ON; whether the HTTP mode file is allowed
UPLOAD_TMP_DIR =; temporary directory for files for HTTP (not specified, using the system default)
UPLOAD_MAX_FILESIZE = 2M; maximum license size for uploading files
Fopen Wrappers;
;;;;;;;;;;;;;;;;;;
ALLOW_URL_FOPEN = ON; whether it is allowed to be treated as http: .. or file as ftp: ...
;;;;;;;;;;;;;;;;;;;;;;
Dynamic expansion;
Dynamic extensions;
;;;;;;;;;;;;;;;;;;;;;;
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,
EXTENSION = MSQL.so
Attention, this should only be the name of the module, and does 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
Attention, MySQL's support is now built, so it doesn't need to use its DLL
;;;;;;;;;;;;;;;;;;;
Module setting;
Module Settings;
;;;;;;;;;;;;;;;;;;;
[Syslog]
Define_syslog_variables = OFF; Whether to define various system log variables
For example: $ log_pid, $ log_cron, and so on.
It is a good idea to turn off it is an improvement.
When run, 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, also 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]
Uodbc.default_db = not yet import
Uodbc.default_user = not yet import
Uodbc.default_pw = not yet import
Uodbc.allow_persistent = ON; Allow or prohibit persistent connection
UODBC.CHECK_PERSISTENT = ON; check whether the connection is also available before reuse
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. Return to the number of bytes of variable, 0 representative 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 get Uodbc.Defaultlrl and Uodbc.Defaultbinmode explanation. [Mysql]
Mysql.allow_persistent = ON; Allow or prohibit persistent connection
Mysql.max_persistent = -1; maximum number of persistent connections. -1 represents unlimited
Mysql.max_links = -1; the maximum number of connections (lasting and non-persistent). -1 represents unlimited
MySQL.DEFAULT_PORT =; mysql_connect () used by default port, if not set, mysql_connect ()
Will use variable $ mysql_tcp_port, or mysql-TCP entry under / etc / services (UNIX),
; Or in compilation is a defined mysql_port (according to this order)
Win32 environment will only check mysql_port.
MySQL.DEFAULT_SOCKET =; the default socket name for local MySQL connections. Empty, use MySQL internal value
MySQL.DEFAULT_HOST =; mysql_connect () The host used by default (invalid in security mode)
MySQL.DEFAULT_USER =; mysql_connect () default username (invalid in security mode)
MySQL.DEFAULT_PASSWORD =; mysql_connect () The password used by default (invalid in security mode)
Attention, saving your password under this file is usually a * bad * idea
; * Any * You can use the user who can use the PHP accessible
; / 'echo cfg_get_var (/ "mysql.default_pansword /") /' to display that password!
And of course, any user who reads the file can also see that password.
[msql]
Msql.allow_persistent = ON; Allow or prohibit persistent connection
Msql.max_persistent = -1; 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 persistent 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 persistent connection
Sybase.max_persistent = -1; 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 automation
They give them the Sybase type according to the results; instead of treating them all as a string.
This compatibility pattern will not stay forever.
Therefore, put your code needs to be modified.
And close the item.
[Sybase-CT]
Sybct.allow_persistent = ON; Allow or prohibit persistent connection
Sybct.max_persistent = -1; 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; Number of Digital Digits for All Bcmath Functions for all bcmath functions 10 decimal digits for all bcmath functions
[browscap]
Browscap = extra / browscap.ini
browscap = c: //win//system/INetsrv//browscap.ini
[Informix]
Ifx.default_host =; ifx_connect () The host used by default (invalid in security mode)
IFX.default_user =; ifx_connect () The username used by default (invalid in security mode)
IFX.DEFAULT_PASSWORD =; ifx_connect () The password used by default (invalid in security mode)
Ifx.allow_persistent = ON; Allow or prohibit persistent connection
IFX.max_persistent = -1; maximum number of persistent connections. -1 represents unlimited
IFX.max_links = -1; maximum number of connections (lasting and non-persistent). -1 represents unlimited
Ifx.textasvarchar = 0; if open, the SELECT state is returns the content of a 'text blob' field, not its ID
ifx.byteasvarchar = 0; If open, the SELECT status returns the content of a 'Byte blob' field, not 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 open, 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 files,
This is wrong, but SEESION is not normal. If it is in liunx, it is / Temp to pay attention :)
This is the path to the data file will be saved.
Session.use_cookies = 1; Whether to use cookies
Session.name = phpsessid
The name session.auto_start = 0 with the session in cookie; initialize the session when the request is started
Session.cookie_lifetime = 0; saving time for the cookie of the second,
; Or 0, until the browser is restarted
Session.cookie_path = /; cookie's valid path
Session.cookie_domain =; cookie's valid domain
Session.Serialize_Handler = PHP; Controller for connection data
PHP is the standard controller of PHP.
session.gc_probability = 1; Press / '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 /' and cleaned by the GC process.
Session.refer_Check =; Check the HTTP reference to invalidate the IDS included in the URLS
Session.Entropy_length = 0; How many bytes are read from the file
session.entropy_file =; Specify here to establish a session ID
; 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; Document After N minutes later
session.use_trans_sid = 1; use transitional SID support, if compiled,
--enable-trans-sid
URL_REWRITER.TAGS = / "a = href, area = href, frame = src, input = src, form = fakentry /"
[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 lowest severity of the displayed error
MSSQL.min_MESSAGE_SEVERITY = 10; the lowest importance of the message displayed
MSSQL.comPATABILITY_MODE = OFF; compatible with the old version of PHP 3.0.
[Assert]
;? ? ? ? ?
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 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 persistent connection
Ii.max_persistent = -1; maximum number of persistent connections. -1 represents unlimited
II.max_links = -1; maximum number of connections (lasting and non-persistent). -1 represents unlimited
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/ "; default Signio server
PFPRO.DEFAULTPORT = 443; Connected default port
PfPro.defaultTimeout = 30; default timeout in seconds
PfPro.ProxyAddress =; the default agent's IP address (if needed)
; pfpro.proxyport =; the default proxy port
; PfPro.Proxylogon =; Default agent login (logon username)
; pfpro.proxypassword =; default agent password
[Sockets]
Sockets.use_system_read = on; use the system's read () function replacement PHP_READ () package
; Local Variables: (local variable)
Tab-Width: 4
; END
Finally, I suggest you look at PHPinfo () although I will give you the most basic things. But it is precisely because of these things. It can most test the future growth.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
http://www.litou.net/