Php. ini configuration details

Source: Internet
Author: User
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, W php. ini or php3.ini is the configuration file that PHP will read 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, refer to the embedded method section.

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
If this option is configured, can you specify a network offering? Why? The PHP program was previously executed. 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.

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.