PHP.ini detailed

Source: Internet
Author: User
Tags http file upload phpinfo zend

  • Short_open_tag
    Whether to support the short mark, before php5.4, the option is off, after php5.4, the default is on

  • Asp_tags
    Whether to allow the use of ASP-style syntax, such as <%%>

  • Precision
    Number of digits (precision) of floating-point digital display

  • Serialize_precision
    Floating-point number is the number of bits saved (precision) in serialization

  • expose_php
    Whether the external exposure of the server is installed in PHP, including the HTTP header to add PHP version number (for example: x-powered-by:php/5.3.7). Before php5.5.0, the PHP logo is always exposed, so if you add a GUID after your URL, it will display a logo (for example: http://www.php.net/?= PHPE9568F34-D428-11D2-A769-00AA001ACF42), similarly, this also affects phpinfo() the output, if prohibited, the PHP logo and additional information will not be displayed.

    From php5.5.0 onwards, the logo and function of this output logos php_logo_guid() have been removed from PHP, so if you add a GUID after the URL, the PHP logo will no longer be displayed. If you set expose_php to OFF, it will not affect the phpinfo() display of PHP's logo in the function.

  • Disable_functions
    This directive allows you to disallow some PHP functions for security reasons, and it accepts a comma-delimited list of function names that are not affected by security mode.
    Only intrinsic functions can be disabled by this directive, and user-defined functions are not affected.
    This directive must be set in php.ini, for example, you cannot set it in httpd.conf.

  • Disable_class
    This directive allows you to disable some PHP classes for security reasons, and it accepts a comma-delimited list of class names that are not affected by security mode and must be configured in php.ini

  • Zend.multibyte
    Allow parsing of multibyte encoded characters in source code

  • Detect_unicode
    Check the BOM (byte order mark) and see if the file contains available multibyte characters. This detection process is __halt_compiler() performed prior to processing and is only available in Zend multibyte mode

  • Exit_on_timeout
    This directive is dedicated to Apache1 's mod_php, which forces the Apache child process to exit when PHP script execution times out. This timeout causes a call inside the Apache1 loggjmp() , which may cause inconsistencies in the state of some extensions. By terminating the process, any lock or memory that is resolved will be cleaned out.

  • Memory_limit
    The default value is 128M, which is 8M before PHP5.2.0 and 16M in 5.2.0.
    This configuration item sets the maximum memory that is allowed to be allocated to the PHP script, which helps prevent the script from exhausting the server's entire memory. Note that if you need to set the memory to No limit, set the value to -1 .
    Before PHP5.2.1, if you want to use this directive, you must compile PHP at the time of the Configure specified --enable-memeory-limit , this compile-time token is also the function memory_get_usage() and memory_get_peak_usage() depends on (before php5.2.1).
    If an integer value is used, the value will be in bytes. - Register_global
    Whether to register Egpcs (Env,get,post,cookie,server) as a global variable.
    After PHP4.2.0, this option is off by default.
    Note that the item cannot be set at run time (ini_set), but you can do so by .htaccess setting it, for example php_flag register_globals off .

    Note: This feature is deprecated in PHP5.3.0 and is removed after PHP5.4.0.

  • Enable_post_data_reading
    Disable this option will make $_POST and will $_FILES not be populated, the only way to access the post data is through the php://input flow wrapper. This is useful for proxy requests or for more efficient processing of post data in memory.

  • Post_max_size
    Sets the maximum allowable post data size. This setting also affects the upload of this file. To upload a large file, this value must be greater than the upload_max_filesize instruction. If your script allows memory limits, memory_limit instructions can also affect file uploads. In simple terms, it memory_limit should be greater than post_max_size . When an integer is used, the unit is byte. If the data of the post is post_max_size larger then $_post and $_files will be empty. There are several ways to track this problem, for example, by passing a $_get variable through a script that processes the data, and <form action="edit.php?processed=1" > then checking whether $_get[' processed ' is set.

  • Auto_prefend_file
    A file that is automatically parsed before the main file executes is specified, as is the case with the Require function, so the include_path is used. If none is specified, automatic prefixes are forbidden to append files.

  • Auto_append_file
    A file that is automatically parsed after the main file is executed is specified with a auto_prefend_file similar. If none is specified, the feature is disabled.

    Note: Auto-append will not occur if the script uses exit () to terminate.

  • Always_populate_raw_post_data
    Always populate $http_raw_post_data to include POST data, otherwise, this variable will simply be populated with unrecognized miime data types. However, the best way to access the raw POST data is through php://input , $HTTP _raw_post_data enctype="multipart/form-data" is not available in the case.

  • Include_path
    Specifies the path to,,, require include fopen() file() , readfile() and file_get_contents() query files. The format is consistent with the operating system's PATH environment variable.
    You can use the set_include_path() modify include path at run time.
    For example, the UNIX system

    Include_path= ".:/ Php/includes "

    Under Windows

    Include_path= ".; C:\php\includes "
  • open_basedir
    restricts php to access only files under the specified directory tree, including the file itself, which is not affected by security mode.
    When a script attempts to access the file system, such as using include or fopen () , the location of the file is checked for permission, and when the file being accessed is outside the specified directory, PHP will deny access to the file. All symbolic links will also be parsed, so it is not possible to bypass the restriction by means of symbolic links. If the file does not exist, the symbolic link will not be parsed and will be compared with the file name with Open_basedir.
    Open_basedir can affect not only file system functions, for example, if the MySQL configuration uses mysqlnd drivers, the LOAD DATA infile will be affected by Open_basedir.
    Special Values . represents the directory where the script is Base-directroy, but it is important to note that the working directory of the script can be modified by chdir () , which is very dangerous. The
    Directive Open_basedir limits the directory to start with php5.2.16 and php5.3.4, and in previous versions he would have used a prefix to match, i.e., if open_basedir=/dir /incl , which will allow access to /dir/include and /dir/incls . When you want to restrict to a directory, add a / to the following. For example, open_basedir=/dir/incl/. The
    is allowed access to all directories by default.

    Note: Starting with php5.3.0, the directive can be specified at run time, which means that if the directive is set to/www/in php.ini, it can be used during script execution Ini_set () Modify the configuration to /www/tmp/. When you list multiple directories, you can use the Path_separator constant as the delimiter.

  • Extension_dir
    PHP dynamically loads the extended directory.

  • Extension
    Which extensions are automatically loaded when PHP is started.

  • File_uploads
    Whether to allow HTTP file upload, related instructions upload_max_size have upload_tmp_dir , post_max_size .

  • Upload_tmp_dir
    A temporary directory for storing files uploaded using the file Upload function, which must be writable by the user who is running PHP, and if not specified, PHP will use the system default.
    If the directory specified here is not writable by PHP, PHP will use the system's default temp directory, and if the open_basedir command is turned on, the system default temporary file directory must be allowed to upload successfully.

  • Upload_max_filesize
    The maximum size of the uploaded file, when the integer value is used, the unit is byte.

  • Max_file_uploads
    The total number of files that are allowed to be uploaded at the same time, starting from php5.3.4, will not be recorded if the Upload file field is empty when the commit is executed.


PHP.ini detailed

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.