PHP Tutorial: php. ini configuration options

Source: Internet
Author: User
Tags informix odbc connection sybase database
Php. ini or php3.ini is the configuration file that PHP reads at startup. The file is stored in/usr/local/lib /. In PHP3.x, the configuration file is php3.ini, and in PHP4.x, it is changed to php. ini. If PHP is installed as a server module, it will be read when the Web server starts its performance and will not be read later.

Php. ini or php3.ini is the configuration file that PHP reads at startup. The file is stored in/usr/local/lib /. In PHP 3.x, the configuration file is php3.ini, and in PHP 4.x, it is changed to php. ini. If PHP is installed as a server module, it will be read when the Web server starts its performance and will not be read later. Therefore, if you modify the configuration, restart the Web server. If the independent php cgi method is applied, read it once every time.

You can use phpinfo () to view the current system configuration. The options are as follows:

Php_value name value
Configure the variable name and value. This option requires PHP 4.x before it can be applied.

Php_flag name on | off
Configure the flag Boolean variable option. This option requires PHP 4.x before it can be applied.

Php_admin_value name value
Configure Apache configuration file variables. The configuration in. htaccess is changed to this option. This option requires PHP 4.x before it can be applied.

Php_admin_flag name on | off
Configure a Boolean variable as a flag. This option requires PHP 4.x before it can be applied.

Asp_tags boolean
Configure whether the PHP program parses the tag with the ASP Script syntax <%> ). This option can be applied only after PHP 3.0.4. For more details, see> embedded methods.

Auto_append_file string
Configure this option to enable the specified file to be appended to the original PHP program. If the exit () function is used in the PHP program, the specified file will not be executed. The string parameter specifies the file to be actively executed.

Auto_prepend_file string
This option allows the specified file to be automatically executed before the original PHP program. The string parameter specifies the file to be actively executed.

Cgi_ext string
This option configures the extended name of the CGI program.

Display_errors boolean
This option is used to configure whether to display the fulfillment error information on the user's browser.

Doc_root string
Configure the server file and the root directory of the PHP file.

Engine boolean
This option requires the apache module method to be applied to PHP. You can configure whether to apply the PHP engine. You can also use php3_engine on/off in httpd. conf to configure whether to use the PHP parser for a directory or virtual website.

Error_log string
This option is used to configure the error log file. On UNIX systems, the parameter string is the file name. Windows NT records the logs in the event viewer. Windows 95/98 does not support system records.

Error_reporting integer
This option is used to configure the level of the system record. The integer parameter is the level mark, which can be added together. The default value is 7. See the following table.
Level clarification
1 General error
2 General warnings
4 parsing error
8 non-critical warnings


Open_basedir string
This option is used to configure the underlying directory for PHP access. PHP programs can access files or directories under the specified directory. This option is important for the sake of system security. The string parameter is the minimum directory node to be restricted. It is worth noting that in UNIX systems, if the file or directory under this node is symbolic link, the target of this option may be discounted, therefore, directory design is an important task of Webmaster. The default value is that all files can be accessed. After PHP 3.0.7, you can configure multiple underlying directories.

 

Gpc_order string
Configure the order and rules of the GET/POST/COOKIE modules. The string parameter is the rule to be configured. for example, the cookie is neglected when \ "GP \" is configured, and the GET parameter is replaced by POST when the access method is used.

Ignore_user_abort string
The default value is Off. It is used to configure continuous handling of client disconnection when the transmission is not completed.

Include_path string
It is the file search path for functions such as require, include, and fopen_with_path in the PHP program. In UNIX or Windows, the diagonal lines are in different directions.

Log_errors boolean
Specifies whether to record program errors in log files.

Magic_quotes_gpc boolean
Configure special characters for The GET/POST/COOKIE modules, including single quotation marks, double quotation marks, backslash, and NUL.

Magic_quotes_runtime boolean
Configure whether the returned materials actively participate in the backslash when overflow occurs.

Magic_quotes_sybase boolean
When you configure the sybase material, you must add a backslash to the single quotation mark when overflow occurs.

Max_execution_time integer
The longest time for the configuration program to perform. The unit is seconds.

Memory_limit integer
Configure the maximum amount of memory that a program can use.

Short_open_tag boolean
Configure whether to apply the short PHP tag ( ). If it is not applied, you must use

Track_errors boolean
Enable this option to keep the final error message with the global variable $ php_errormsg.

Track_vars boolean
Open this option to allow the user to actively parse the input string to the variable, instead of processing it by yourself.

Upload_tmp_dir string
Specifies the temporary path of the uploaded file.

User_dir string
Specifies the path of the root directory of the user.

Warn_plus_overloading boolean
If this option is enabled, strings can only be connected by periods (.), but cannot be connected by the plus sign.

SMTP string
In Windows control systems, the SMTP server is used to specify the SMTP server for mail function applications. The string parameter is the SMTP server name.

Sendmail_from string
Configure the \ "From: \" string for the Windows series to control the application mail function.

Sendmail_path string
Configure the placement path of the sendmail program. For example,/usr/sbin/sendmail.

Safe_mode boolean
Configure PHP in safe mode.

Safe_mode_exec_dir string
Configure the path of the security mode program.

Debugger. host string
Specify the Name of the server for remote debugging, which can be an IP address or Domain Name.

Debugger. port string
Configure the port of the remote debugging server ).

Debugger. enabled boolean
Whether the configuration is considered debugging mode.

Enable_dl boolean
This option is valid only when the apache module method is applied. Function used to configure PHP. When the system is in safe-mode, this option enable cannot apply the dl () function.

Extension_dir string
Configure the path of the dynamic function.

Extension string
The dynamic expansion function to be loaded when PHP is started.

 

Mysql. allow_persistent boolean
If you configure whether to allow MySQL database persistent connection (persistent connections), the function will be affected.

Mysql. max_persistent integer
Configure each handler to maintain a maximum of several MySQL persistent connections.

Mysql. max_links integer
Configure a maximum of several MySQL connections for each processing program, including persistent connections.

Msql. allow_persistent boolean
Whether to configure persistent connections will affect the function.

Msql. max_persistent integer
Configure each handler to maintain a maximum of several persistent mSQL connections.

Msql. max_links integer
Configure a maximum of several mSQL connections for each handler, including persistent connections.

Pgsql. allow_persistent boolean
Whether to configure persistent connections will affect the function.

Pgsql. max_persistent integer
Configure each handler to maintain a maximum of several S of persistent connections.

Pgsql. max_links integer
Configure a maximum of several IPVs connections for each handler, including persistent connections.

Sybase. allow_persistent boolean
If you configure whether to allow persistent connection to the Sybase database (persistent connections), the function will be affected.

Sybase. max_persistent integer
Configure each handler to maintain a maximum of several Sybase persistent connections.

Sybase. max_links integer
Configure a maximum of several Sybase connections for each processing program, including persistent connections.

Sybct. allow_persistent boolean
Configure whether to allow persistent connection (persistent connections) to the Sybase-CT Database. the default value is enabled.

Sybct. max_persistent integer
Configure each handler to maintain a maximum of several Sybase-CT persistent connections. The default value is-1.

Sybct. max_links integer
Configure a maximum of several Sybase-CT connections for each processing program, including persistent connections. The default value is-1, with no performance restrictions.

Sybct. min_server_severity integer
Configure the minimum number of errors reported by The Sybase-CT server. The default value is 10.

Sybct. min_client_severity integer
Configure the minimum number of errors reported by The Sybase-CT client. The default value is 10.

Sybct. login_timeout integer
Configure the maximum time that Sybase-CT can be applied. The default value is 1 minute.

Sybct. timeout integer
Configure the query control time limit for Sybase-CT. The default value is unlimited.

Sybct. hostname string
Configure the name of the machine that can be connected to Sybase-CT. The default value is unlimited.

Ifx. allow_persistent boolean
If you configure whether to allow the Informix database to be connected continuously (persistent connections), the function will be affected.

Ifx. max_persistent integer
Configure each handler to maintain a maximum of several Informix persistent connections.

Ifx. max_links integer
Configure a maximum of several Informix connections for each handler, including persistent connections.

Ifx. default_host string
Configure the default server name that Informix connects to for the ifx_connect () or ifx_pconnect () function application.

Ifx. default_user string
Configure the default user account connected to Informix for ifx_connect () or ifx_pconnect (function application.

Ifx. default_password string

 

Configure the user password for the default Informix connection for the ifx_connect () or ifx_pconnect () function application.


Ifx. blobinfile boolean
Configure the Informix long bit Class mode. table 0 is in the memory, and Table 1 is in the file. You can also apply the ifx_blobinfile_mode () function in the PHP program to fix the issue.

Ifx. textasvarchar boolean
Configure the default Informix text mode. table 0 returns the blob code. Table 1 returns the varchar string. You can also use the ifx_textasvarchar () function in the PHP program to modify the configuration.

Ifx. byteasvarchar boolean
Configure the default Informix bit group mode. table 0 returns the blob code. Table 1 returns the varchar string. You can also apply ifx_byteasvarchar () in the PHP program to modify the configuration.

Ifx. charasvarchar boolean
Configure whether to actively remove spaces at the end of the character string returned by Informix.

Ifx. nullformat boolean
Configure the return method of the NULL field. true indicates that the return string is NULL. false indicates that the return string \ "\" is returned \"\". You can also use ifx_nullformat () in the PHP program.

Bcmath. scale integer
Configure the number of decimal places in the BC high-accuracy function library.

Browscap string
Configure the open file name of the browser.

Uodbc. default_db string
Configure the default name of the database connected to ODBC for the application of the odbc_connect () or odbc_pconnect () function.

Uodbc. default_user string
Configure the user account for which ODBC is connected by default for odbc_connect () or odbc_pconnect () function applications.

Uodbc. default_pw string
Configure the user password for the default ODBC Connection for odbc_connect () or function applications.

Uodbc. allow_persistent boolean
Configuring whether to allow ODBC database persistent connection (persistent connections) affects the odbc_pconnect () function.

Uodbc. max_persistent integer
Configure each handler to maintain a maximum of several ODBC connections.

Uodbc. max_links integer
Configure a maximum of several ODBC connections for each processing program, including persistent connections.
The following session-related configuration values are supported by PHP 4.x and later versions. In the configuration file of php. ini.


Session. save_handler
Defines the name of the file for storing session materials. The default value is files.

Session. save_path
Defines the file path for storing materials in sessions. The default value is/tmp.

Session. name
Configure the cookie name applied by the session. The default value is PHPSESSID.

Session. auto_start
Configure whether the session is opened automatically. The default value is 0 (no ).

Session. lifetime
Configure the retention time after the cookie is sent to the browser, in seconds. The default value is 0 until the browser is closed.

Session. serialize_handler
Define the headers of the persistent/undo material. This function is only applicable to the WDDX module or internal PHP applications. The default value is php.

Session. gc_probability
Configure the waste collection (gc, garbage collection) processing rate for each request response. The default value is 1.

Session. gc_maxlifetime
The number of live seconds before the configuration waste is cleared.

Session. extern_referer_check
Determine whether to delete the client's Session code. Sometimes the configuration is not deleted for security or other considerations. The default value is 0.

 

Session. entropy_file
When the session code is configured, the external high-entropy resources or files are used to establish the application, such as/dev/random or/dev/urandom on UNIX systems.

Session. entropy_length
Configure the number of bits that a session reads from a high-entropy resource. The default value is 0.

Session. use_cookies
Configure whether to change the session to cookie on the client. The default value is 1. this function is enabled for the table.

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.