PHP.ini Configuration Detail

Source: Internet
Author: User
Tags execution functions garbage collection connect odbc mysql sybase sybase database
PHP.ini or Php3.ini is the configuration file that PHP reads when it starts. The file is stored in a/usr/local/lib/path. In the PHP 3.x version of the configuration file for Php3.ini, and in the PHP 4.x version to php.ini. If PHP is installed as a server module, it will read when the Web server starts execution and then no longer read, so if you change the configuration, restart the Web server. If you are using a standalone PHP CGI, read it every time.
To see the current system configuration, you can see it with phpinfo (). The following options are configured


Php_value Name Value
Configure variable names and values. This option will not be available until you have a 4.x version of PHP.

Php_flag name On|off
Configure flags Boolean variable options. This option will not be available until you have a 4.x version of PHP.

Php_admin_value Name Value
Configure the Apache configuration file variable. The original configuration of the. htaccess is changed to this option configuration. This option will not be available until you have a 4.x version of PHP.

Php_admin_flag name On|off
Configure Boolean variables as flags. This option will not be available until you have a 4.x version of PHP.

Asp_tags Boolean
Configure whether the PHP program resolves the tag (tag) <%%> with ASP Script syntax. This option is not available after PHP 3.0.4. More details can be used to refer to the part of the embedding method.

Auto_append_file string
Configure this option to have the specified file attached automatically after the original PHP program. If the exit () function is useful in a PHP program, the specified file is not executed. The parameter string is the specified automatically executed file.

Auto_prepend_file string
Configure this option to specify the  voluntarily? The PHP program is executed automatically before. The parameter string is the specified automatically executed file.

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

Display_errors Boolean
This option configures whether you want to display error messages that are executed on the user's browser.

Doc_root string
Configure the server's files and the root directory where the PHP files are placed.

Engine Boolean
This option requires using the Apache module to use PHP. You can configure whether you want to use the PHP engine. Adding Php3_engine On/off in httpd.conf can also configure whether a directory or a virtual Web site will use a PHP parser.

Error_log string
This option is used to configure error logging files. The parameter string is the file name on the UNIX system. Windows NT will record records in the log of the Event Viewer. Windows 95/98 does not support system logging.

error_reporting integer
This option is used to configure the level of system records. The parameter integer is the rank series mark, can add together, the default value is 7, see the following table
Series Description
1 General Errors
2 General Warning
4 Parse Error
8 Non-critical warnings


Open_basedir string
This option is used to configure the bottommost directory that provides access to PHP. A PHP program can be accessed from a file or directory below the specified directory. This option is used primarily for system security considerations. The parameter string is the lowest-level directory node to restrict. It is noteworthy that in a UNIX system, if the file or directory under that node has a symbolic link (symbolic link), the purpose of using this option may be discounted, so the design of the catalog is considered a webmaster important task. The default value is that all files are accessible. After the PHP 3.0.7 version, you can configure multiple underlying directories.

Gpc_order string
Configure the order and rules of the Get/post/cookie three modules. The parameter string is the rule to be configured, for example, configuring "GP" to indicate that the cookie is ignored and substituting a POST for get with the access method.

Ignore_user_abort string
The default value is off. Used to configure when the transfer is not completed, the client is disconnected to continue processing.

Include_path string
A file search path for functions such as require, include, and Fopen_with_path in PHP programs. The slash direction in UNIX or Windows is different.

Log_errors Boolean
Specifies whether to log in log files when the program is wrong.

MAGIC_QUOTES_GPC Boolean
Configure Get/post/cookie three module special characters, including single quotes, double quotes, backslashes, and null characters (NUL) to automatically add backslashes when overflow characters.

Magic_quotes_runtime Boolean
Configuration returns whether the data is automatically added to the backslash when the overflow character.

Magic_quotes_sybase Boolean
Configure the single quotes in Sybase data to automatically add backslashes when overflow characters.

Max_execution_time integer
Configures the longest execution time for a program. The unit is seconds.

Memory_limit integer
Configures the maximum amount of memory that the program uses.

Short_open_tag Boolean
Configure whether to use short PHP tags (?>). If not used, you must use <?php as the beginning of the program, to make the program conform to the standard of XML to turn off this feature.

Track_errors Boolean
Turn on this option to make the final error message follow the global variable $php_errormsg.

Track_vars Boolean
Opening this option allows the user-entered string to be automatically parsed into a variable rather than handled by itself.

Upload_tmp_dir string
Specifies the temporary path to the upload file.

User_dir string
Specifies the path to the user's root directory.

Warn_plus_overloading Boolean
If this option is turned on, the string can only be linked by a period (.) in English, but not by a plus sign (+).

SMTP string
In the Windows family operating system, specifies the SMTP server to use for mail functions. The parameter string is the SMTP server name.

Sendmail_from string
Configure the "from:" String for the Windows family operating system to use the mail function.

Sendmail_path string
Configure the placement path for the SendMail program. such as/usr/sbin/sendmail.

Safe_mode Boolean
Configure PHP to execute in safe mode.

Safe_mode_exec_dir string
Configures the path for Safe Mode program execution.

Debugger.host string
Specifies the server name for remote debugging, either IP or Domain name.

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

Debugger.enabled Boolean
Whether the configuration can be debug mode.

ENABLE_DL Boolean
This option is available in the form of the Apache module (Apache modules). Used to configure whether the DL () function of PHP works. This option does not enable the DL () function when the system is in Safe Mode (Safe-mode).

Extension_dir string
Configures the path of a dynamic function.

Extension string
The dynamic extension that PHP will load when it starts.

Mysql.allow_persistent Boolean
Configuring whether to allow a persistent MySQL database connection (persistent connections) affects the Mysql_pconnect () function.

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

Mysql.max_links integer
Configure each handler to open up to a few MySQL connections, including persistent connections.

Msql.allow_persistent Boolean
Configuring whether to allow mSQL database persistent connections (persistent connections) affects the Msql_pconnect () function.

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

Msql.max_links integer
Configure each handler to open up to a few msql connections, including persistent connections.

Pgsql.allow_persistent Boolean
Configuring whether to allow Postgres database persistent connections (persistent connections) affects the Pg_pconnect () function.

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

Pgsql.max_links integer
Configure each handler to open up to a few Postgres connections, including persistent connections.

Sybase.allow_persistent Boolean
Configuring whether to allow the Sybase database to continue to connect (persistent connections) affects the Sybase_pconnect () function.

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

Sybase.max_links integer
Configure each handler to open up to a few Sybase connections, including persistent connections.

Sybct.allow_persistent Boolean
Configure whether to allow SYBASE-CT database persistent connections (persistent connections), and the default value is open.

Sybct.max_persistent integer
Configure each handler to maintain a maximum of several sybase-ct persistent connections. The default value of-1 indicates no limit.

Sybct.max_links integer
Configure each handler to open up to a few sybase-ct connections, including persistent connections. The default value is-1, which means there are no restrictions.

Sybct.min_server_severity integer
Configure the minimum number of pens for SYBASE-CT server error reporting. The default value is 10.

Sybct.min_client_severity integer
Configure the minimum number of pens for SYBASE-CT client error reporting. The default value is 10.

Sybct.login_timeout integer
Configure the maximum login time that SYBASE-CT can use. The default value is 1 minutes.

Sybct.timeout integer
Configures the SYBASE-CT query operation time limit. The default value is unrestricted.

Sybct.hostname string
Configure SYBASE-CT to connect machine names. Default value is not set

Ifx.allow_persistent Boolean
Configuring whether to allow the Informix database to continue to connect (persistent connections) affects the Ifx_pconnect () function.

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

Ifx.max_links integer
Configure each handler to open up to several Informix connections, including persistent connections.

Ifx.default_host string
Configure the server name for the Informix default connection for use by the Ifx_connect () or Ifx_pconnect () function.

Ifx.default_user string
Configure the user account for the Informix default connection for use by the Ifx_connect () or Ifx_pconnect () function.

Ifx.default_password string
Configure the user password for the Informix default connection for use by the Ifx_connect () or Ifx_pconnect () function.

Ifx.blobinfile Boolean
Configure the Informix long-bit class mode, 0 tables in memory, and 1 tables in the file. You can also use the Ifx_blobinfile_mode () function in your PHP program to modify it.

Ifx.textasvarchar Boolean
Configure the Informix text mode defaults, 0 tables return the BLOB's code, and the 1 table returns the varchar string. You can also use the Ifx_textasvarchar () function in your PHP program to modify the configuration.

Ifx.byteasvarchar Boolean
Configure the Informix bit group mode defaults, the 0 table returns the code for the Blob, and the 1 table returns the varchar string. You can also use Ifx_byteasvarchar () in your PHP program to modify the configuration.

Ifx.charasvarchar Boolean
Configures whether the trailing spaces of Informix return strings are automatically removed.

Ifx.nullformat Boolean
Configures the return of a NULL field, true to return a string null,false the table return string "". Also in the PHP program with Ifx_nullformat () modified.

Bcmath.scale integer
Configure the number of decimal places for the BC high precision function library.

Browscap string
Configure the browser's open file capability name.

uodbc.default_db string
Configure the database name of the ODBC default connection for use by the Odbc_connect () or Odbc_pconnect () function.

Uodbc.default_user string
Configure the user account for the ODBC default connection for use by the Odbc_connect () or Odbc_pconnect () function.

UODBC.DEFAULT_PW string
Configure the user password for the ODBC default connection for use by the Odbc_connect () or Odbc_pconnect () function.

Uodbc.allow_persistent Boolean
Configuring whether to allow an ODBC database to continue to connect (persistent connections) affects the Odbc_pconnect () function.

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

Uodbc.max_links integer
Configure each handler to open up to a few ODBC connections, including persistent connections.
The following configuration values related to the session are supported by the version side of PHP above 4.x. In the php.ini configuration file.


Session.save_handler
Defines the file name of the session store data. The default value is files.

Session.save_path
Defines the file path where the session stores data. The default value is/tmp.

Session.name
Configures the cookie name used by the session. The default value is PHPSESSID.

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

Session.lifetime
Configure the time, in seconds, for the cookie to be saved after it is sent to the browser. The default value is 0, which means until the browser closes.

Session.serialize_handler
Defines a continuous/solution continuous data header, this feature is only WDDX module or PHP internal use. The default value is PHP.

Session.gc_probability
Configure the probability of each collection of waste collected (GC, garbage collection) that requires a timely return. The default value is 1.

Session.gc_maxlifetime
Configure the number of surviving seconds before the waste is cleared.

Session.extern_referer_check
Determines whether the session code referenced to the client is to be deleted. Sometimes it is configured to not delete when security or other considerations occur. The default value is 0.

Session.entropy_file
When configuring session code to be established, use an external high entropy value resource or file to establish, such as/dev/random or/dev/urandom on UNIX systems.

Session.entropy_length
Configures the number of bit groups that the session reads from a high entropy value resource. The default value is 0.

Session.use_cookies
Configure whether to turn the session into a cookie exists on the client side. The default value is 1, and the table is open for this feature.

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.