Home Backend Development PHP Tutorial php.ini Chinese version configuration instructions under php-5.2 Page 1/3_PHP Tutorial

php.ini Chinese version configuration instructions under php-5.2 Page 1/3_PHP Tutorial

Jul 21, 2016 pm 03:50 PM
php.ini Down Chinese Version by and character document of blank Simple grammar illustrate Configuration

;;;;;;;;;;;;
;; Syntax ;;

; The syntax of this file is very simple. Whitespace characters and lines starting with semicolons are simply ignored.
; Section titles (eg: [php]) are also simply ignored, even though they may have some meaning in the future.

; The format of the setting directive is as follows:
; directive = value
; The directive name (directive) is case-sensitive! So "foo=bar" is different from "FOO=bar".
; Value can be:
; 1. A string delimited by quotation marks (such as: "foo")
; 2. A number (integer or floating point number, such as: 0, 1, 34, -1, 33.55)
; 3. A PHP constant (such as: E_ALL, M_PI)
; 4. An INI constant (On, Off, none)
; 5. An expression (such as : E_ALL & ~E_NOTICE)

; Expressions in the INI file only use: bitwise operators, logical NOT, parentheses:
; | bitwise or
; & bitwise and
; ~ Bit NOT
; ! Logical NOT

; The Boolean flag uses On to indicate on and Off to indicate off.

; An empty string can be represented by not writing anything after the equal sign, or using the none keyword:
; foo = ; Set foo to an empty string
; foo = none ; Set foo to the empty string
; foo = "none" ; Set foo to the string 'none'

; if you use dynamic expansion (PHP extension or Zend extension) in the directive value constants in
; then you can only use these constants after loading these dynamically expanded command lines.



;; httpd.conf ;;

; You can also override the value of php.ini in httpd.conf for more flexible configuration:
; php_value name value ; Set non-bool type instructions, set value to none to clear the previous setting
; php_flag name on|off ; Only used to set bool type instructions

; PHP constant (such as E_ALL) can only be used in php.ini, and the corresponding mask value must be used in httpd.conf.
; Directives with the "SYS" flag can only be used in the global configuration section of httpd.conf.

;[Updated on 2007-4-9, added more information about PHP6, and corrected and added some information according to PHP-5.2.2]
;======= ======================================
;;======= ===Detailed explanation of configuration instructions============================
;============== ================================
; The setting values ​​of each command below are consistent with PHP-5.2. 2 The built-in defaults are the same.
; That is, if 'php.ini' does not exist, or you delete some lines, the default value will be the same.

;;;;;;;;;;;;;;
;; Apache ;;

[Apache]
; Only when using PHP as an Apache module efficient.

child_terminate = Off
; Whether the PHP script is allowed to use the apache_child_terminate() function to terminate the child process after the request ends.
; This directive is only available when PHP is installed as a module of Apache1.3 on UNIX platforms. It does not exist in any other case.

engine = On
; Whether to enable the PHP parsing engine.
; Tip: You can turn on or off the PHP parsing engine based on the directory or virtual host in httpd.conf.

last_modified = Off
; Whether to place the last modification time of the PHP script in the Last-Modified response header.

xbithack = Off
; Whether to parse as a PHP executable byte group regardless of the end of the file.



;; PHP Core;;


[PHP-Core-DateTime]
; The first four configuration options are currently only used for date_sunrise() and date_sunset() function.

date.default_latitude = 31.7667
; Default latitude

date.default_longitude = 35.2333
; Default longitude

date.sunrise_zenith = 90.583333
; Default Sunrise zenith

date.sunset_zenith = 90.583333
; Default sunset zenith

date.timezone =
; Used for all dates and times when the TZ environment variable is not set The function's default time zone.
; Mainland China should use "PRC"
; The priority order of application time zones is:
; 1. The time zone set with the date_default_timezone_set() function (if set)
; 2. TZ environment variable (if not empty)
; 3. The value of the instruction (if set)
; 4. PHP's own guess (if the operating system supports it)
; 5. If all of the above If unsuccessful, use UTC


[PHP-Core-Assert]

assert.active = On
; Whether to enable assert() assertion evaluation

assert.bail = Off
; Whether to abort the execution of the script when a failed assertion occurs

assert.callback =
; The callback function executed when a failed assertion occurs

assert.quiet_eval = Off
; Whether to use quiet evaluation (do not display any error information, equivalent to error_reporting=0).
; If turned off, the current error_reporting directive value is used when evaluating assertion expressions.

assert.warning = On
; Whether to issue a warning for each failed assertion


[PHP-Core-SafeMode]
; Safe mode is to solve the problem of sharing Established for server security issues.
; But trying to solve this problem at the PHP layer is structurally unreasonable.
; The correct approach should be to modify the web server layer and operating system layer.
; Therefore, the safe mode is abolished in PHP6 and security protection based on open_basedir is used.
; This part of the instructions has been completely deleted in PHP6.

safe_mode = Off
;SYS
; Whether to enable safe mode.
; When opened, PHP will check whether the owner of the current script is the same as the owner of the file being operated.
; If they are the same, the operation is allowed, if they are different, the operation is denied.

safe_mode_gid = Off
;SYS
; In safe mode, a UID comparison check is performed by default when accessing files.
; But in some cases strict UID checking is not suitable, and loose GID checking is enough.
; If you want to relax it to only do GID comparison, you can turn this parameter on.

safe_mode_allowed_env_vars = "PHP_"
;SYS
; A comma-separated list of prefixes for environment variables that users can only change in safe mode.
; Allows users to set certain environment variables, which may lead to potential security vulnerabilities.
; Note: If this parameter value is empty, PHP will allow users to change any environment variables!

safe_mode_protected_env_vars = "LD_LIBRARY_PATH"
;SYS
; List of environment variables (comma separated) that users cannot change in safe mode.
; These variables are protected even when the safe_mode_allowed_env_vars directive is set to allowed.

safe_mode_exec_dir = "/usr/local/php/bin"
;SYS
; In safe mode, only executable programs in this directory are allowed to be executed by functions that execute system programs.
; These functions are: system, escapeshellarg, escapeshellcmd, exec, passthru,
; proc_close, proc_get_status, proc_nice, proc_open, proc_terminate, shell_exec

safe_mode_include_dir =
;SYS
; In safe mode, UID/GID checking will be skipped when files in this group directory and its subdirectories are included.
; In other words, if the value here is empty, any file whose UID/GID does not match is not allowed to be included.
; The directory set here must already exist in the include_path directive or be included with a full path.
; Use colons (semicolons under Win) to separate multiple directories.
; The specified restriction is actually a prefix, not a directory name,
; that is, "/dir/incl" will allow access to "/dir/include" and "/dir/incls"
; If you wish to restrict access to a specific directory, add a trailing slash.


[PHP-Core-Safe]

allow_url_fopen = On
;SYS
; Whether to allow remote files to be opened

allow_url_include = Off
;SYS
; Whether to allow include/require remote files.

disable_classes =
;SYS
; This directive accepts a comma separated list of class names to disable specific classes.

disable_functions =
;SYS
; This directive accepts a comma-separated list of function names to disable specific functions.

enable_dl = On
;SYS
; Whether to allow the use of the dl() function. The dl() function only works when PHP is installed as an apache module.
; Disabling the dl() function is mainly for security reasons, because it can bypass the restrictions of the open_basedir directive.
; Always disable the dl() function in safe mode, regardless of how it is set here.
; This directive has been deleted in PHP6, which is equivalent to setting it to Off.

expose_php = On
;SYS
; Whether to expose the fact that PHP is installed on the server (add its signature in the http header).
; It poses no direct security threat, but it lets the client know that PHP is installed on the server.

open_basedir =
;SYS
; Limit all files (including the file itself) that PHP is allowed to operate to this group of directory lists.
; When a script attempts to open a file outside the specified directory tree, it will be rejected.
; All symbolic links are resolved, so it is not possible to circumvent this restriction through symbolic links.
; The special value '.' specifies that the directory where the script is stored will be used as the base directory.
; But this is somewhat dangerous, because the script's working directory can be easily changed by chdir().
; For shared servers, it will be very useful to flexibly set this directive in httpd.conf.
; Use semicolons to separate directories on Windows and colons on UNIX systems.
; When used as an Apache module, the open_basedir path in the parent directory will be automatically inherited.
; The specified restriction is actually a prefix, not a directory name,
; In other words, "/dir/incl" will allow access to "/dir/include" and "/dir/incls",
; If you wish to control access to a specific directory, add a trailing slash.
; The default is to allow all files to be opened.

sql.safe_mode = Off
;SYS
; Whether to use SQL safe mode.
; If on, database connection functions that specify default values ​​will use these default values ​​instead of supported parameters.
; For the connection function of each different database, please refer to the corresponding manual page for its default value.


[PHP-Core-Error]

error_reporting = E_ALL & ~E_NOTICE
; The error reporting level is the superposition of bit fields, it is recommended to use E_ALL | E_STRICT
; 1 E_ERROR Fatal runtime error
; 2 E_WARNING Runtime warning (non-fatal error)
; 4 E_PARSE Compile time parsing error
; 8 E_NOTICE Runtime reminder (often a bug, it may be intentional )
; 16 E_CORE_ERROR Fatal error during PHP startup initialization
; 32 E_CORE_WARNING Warning (non-fatal error) during PHP startup initialization
; 64 E_COMPILE_ERROR Fatal error during compilation
; 128 E_COMPILE_WARNING compile-time warning (non-fatal error)
; 256 E_USER_ERROR user-defined fatal error
; 512 E_USER_WARNING user-defined warning (non-fatal error)
; 1024 E_USER_NOTICE user-defined Definition reminder (often a bug, may also be intentional)
; 2048 E_STRICT Coding standardization warning (recommend how to modify for forward compatibility)
; 4096 E_RECOVERABLE_ERROR Near-fatal runtime error, if not caught Treated as E_ERROR
; 6143 E_ALL All errors except E_STRICT (8191 in PHP6, including all)

track_errors = Off
; Whether to save the latest error or warning in the variable $php_errormsg information.

display_errors = On
; Whether to display error messages as part of the output.
; On the final published web site, it is strongly recommended that you turn off this feature and use error logging instead (see below).
; Turning this feature on in the final published web site may expose some security information,
; such as file paths, database plans, or other information on your web service.

display_startup_errors = Off
; Whether to display PHP startup errors.
; Even if the display_errors directive is turned on, turning this parameter off will not display errors when PHP starts.
; It is recommended that you turn off this feature unless you must use it for debugging.

report_memleaks = On
; Whether to report memory leaks. This parameter only works in PHP compiled in debug mode,
; and must include E_WARNING in the error_reporting directive

report_zend_debug = On
; No documentation yet

html_errors = On
; Whether to use HTML tags in error messages.
; Note: Do not use this feature on published sites!

docref_root = ;"http://localhost/phpmanual/"
docref_ext = ;".html"
; If the html_errors directive is turned on, PHP will display a hyperlink on the error message.
; Direct link to a page describing the error or the function that caused the error.
; You can download the php manual from http://www.php.net/docs.php,
; and point the docref_root directive to the URL directory where your local manual is located.
; You must also set the docref_ext directive to specify the file extension (must contain '.').
; NOTE: Do not use this feature on published sites.

error_prepend_string = ;""
; String used to output before error message
error_append_string = ;"
"
; Used String output after the error message

xmlrpc_errors = Off
;SYS
xmlrpc_error_number = 0
; No documentation yet


[PHP-Core-Logging ]

define_syslog_variables = Off
; Whether to define various system log variables, such as: $LOG_PID, $LOG_CRON, etc.
; Good idea to turn it off to be more efficient.
; You can call define_syslog_variables() function to define these variables at runtime.

error_log =
; Which file to record the error log to. The file must be writable by the web server user.
; syslog means logging to the system log (event log under NT, syslog(3) under Unix)
; If no value is set here, the error will be logged to the error log of the web server .

log_errors = Off
; Whether to record errors in the log file and where to record them depends on the error_log directive.
; It is strongly recommended that you use logging errors instead of direct output when you finally publish the web site.
; This will let you know what went wrong without exposing sensitive information.

log_errors_max_len = 1024
; Set the maximum length of the error source associated with the error message attached to the error log.
; The value set here is valid for displayed and logged errors as well as $php_errormsg.
; Set to 0 to allow unlimited length.

ignore_repeated_errors = Off
; Whether to ignore repeated error messages when recording error logs.
; Error messages must appear on the same line in the same file to be considered duplicates.

ignore_repeated_source = Off
; Whether to ignore repeated error sources when ignoring repeated error messages.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/319303.htmlTechArticle;;;;;;;;;;;;;; Syntax;; ; The syntax of this file is very simple . Whitespace characters and lines starting with semicolons are simply ignored. ; Chapter titles (eg: [php]) are also simply ignored, even if in the future...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What to do if the 0x80004005 error code appears. The editor will teach you how to solve the 0x80004005 error code. What to do if the 0x80004005 error code appears. The editor will teach you how to solve the 0x80004005 error code. Mar 21, 2024 pm 09:17 PM

When deleting or decompressing a folder on your computer, sometimes a prompt dialog box "Error 0x80004005: Unspecified Error" will pop up. How should you solve this situation? There are actually many reasons why the error code 0x80004005 is prompted, but most of them are caused by viruses. We can re-register the dll to solve the problem. Below, the editor will explain to you the experience of handling the 0x80004005 error code. Some users are prompted with error code 0X80004005 when using their computers. The 0x80004005 error is mainly caused by the computer not correctly registering certain dynamic link library files, or by a firewall that does not allow HTTPS connections between the computer and the Internet. So how about

How to transfer files from Quark Cloud Disk to Baidu Cloud Disk? How to transfer files from Quark Cloud Disk to Baidu Cloud Disk? Mar 14, 2024 pm 02:07 PM

Quark Netdisk and Baidu Netdisk are currently the most commonly used Netdisk software for storing files. If you want to save the files in Quark Netdisk to Baidu Netdisk, how do you do it? In this issue, the editor has compiled the tutorial steps for transferring files from Quark Network Disk computer to Baidu Network Disk. Let’s take a look at how to operate it. How to save Quark network disk files to Baidu network disk? To transfer files from Quark Network Disk to Baidu Network Disk, you first need to download the required files from Quark Network Disk, then select the target folder in the Baidu Network Disk client and open it. Then, drag and drop the files downloaded from Quark Cloud Disk into the folder opened by the Baidu Cloud Disk client, or use the upload function to add the files to Baidu Cloud Disk. Make sure to check whether the file was successfully transferred in Baidu Cloud Disk after the upload is completed. That's it

Understand Linux Bashrc: functions, configuration and usage Understand Linux Bashrc: functions, configuration and usage Mar 20, 2024 pm 03:30 PM

Understanding Linux Bashrc: Function, Configuration and Usage In Linux systems, Bashrc (BourneAgainShellruncommands) is a very important configuration file, which contains various commands and settings that are automatically run when the system starts. The Bashrc file is usually located in the user's home directory and is a hidden file. Its function is to customize the Bashshell environment for the user. 1. Bashrc function setting environment

How to deal with blanks when playing PPT slides How to deal with blanks when playing PPT slides Mar 26, 2024 pm 07:51 PM

1. Open the PPT file you created and select the second slide. 2. On the second slide, select one of the pictures, and then select [Animation] to add any animation effect. 3. In the start column of the animation bar, change [While Standalone] to [After Previous Animation], and you will see that the picture animation label [1] will change to [0]. Do the same for subsequent slides, and you can see the effect by playing the slide at the end.

What is hiberfil.sys file? Can hiberfil.sys be deleted? What is hiberfil.sys file? Can hiberfil.sys be deleted? Mar 15, 2024 am 09:49 AM

Recently, many netizens have asked the editor, what is the file hiberfil.sys? Can hiberfil.sys take up a lot of C drive space and be deleted? The editor can tell you that the hiberfil.sys file can be deleted. Let’s take a look at the details below. hiberfil.sys is a hidden file in the Windows system and also a system hibernation file. It is usually stored in the root directory of the C drive, and its size is equivalent to the size of the system's installed memory. This file is used when the computer is hibernated and contains the memory data of the current system so that it can be quickly restored to the previous state during recovery. Since its size is equal to the memory capacity, it may take up a larger amount of hard drive space. hiber

How to configure and install FTPS in Linux system How to configure and install FTPS in Linux system Mar 20, 2024 pm 02:03 PM

Title: How to configure and install FTPS in Linux system, specific code examples are required. In Linux system, FTPS is a secure file transfer protocol. Compared with FTP, FTPS encrypts the transmitted data through TLS/SSL protocol, which improves Security of data transmission. In this article, we will introduce how to configure and install FTPS in a Linux system and provide specific code examples. Step 1: Install vsftpd Open the terminal and enter the following command to install vsftpd: sudo

Detailed explanation of the role of .ibd files in MySQL and related precautions Detailed explanation of the role of .ibd files in MySQL and related precautions Mar 15, 2024 am 08:00 AM

Detailed explanation of the role of .ibd files in MySQL and related precautions MySQL is a popular relational database management system, and the data in the database is stored in different files. Among them, the .ibd file is a data file in the InnoDB storage engine, used to store data and indexes in tables. This article will provide a detailed analysis of the role of the .ibd file in MySQL and provide relevant code examples to help readers better understand. 1. The role of .ibd files: storing data: .ibd files are InnoDB storage

Create and run Linux ".a" files Create and run Linux ".a" files Mar 20, 2024 pm 04:46 PM

Working with files in the Linux operating system requires the use of various commands and techniques that enable developers to efficiently create and execute files, code, programs, scripts, and other things. In the Linux environment, files with the extension ".a" have great importance as static libraries. These libraries play an important role in software development, allowing developers to efficiently manage and share common functionality across multiple programs. For effective software development in a Linux environment, it is crucial to understand how to create and run ".a" files. This article will introduce how to comprehensively install and configure the Linux ".a" file. Let's explore the definition, purpose, structure, and methods of creating and executing the Linux ".a" file. What is L

See all articles