The following is the original description and default configuration in PHP. ini:
; Open_basedir, if set, limits all file operations to the defined directory
; And below. This directive makes most sense if used in a per-directory or
; Per-virtualhost web server configuration file. This directive is
; * Not * affected by whether safe mode is turned on or off.
Open_basedir =.
Open_basedir can restrict the activity scope of files accessed by users to a specified region. It is usually the path of the home directory
The "." symbol can be used to represent the current directory. Note that the restriction specified by open_basedir is actually a prefix rather than a directory name.
For example, if "open_basedir =/DIR/user", the directories "/DIR/user" and "/DIR/user1" are both
Accessible. Therefore, if you want to restrict access to a specified directory only, end the path with a slash. For example, set:
"Open_basedir =/DIR/user /"
Open_basedir can also set multiple directories at the same time. In Windows, use semicolons to separate directories and use them in any other system.
Separate directories with colons. When it acts on the Apache module, the open_basedir path in the parent directory is automatically inherited.
There are three ways to make independent settings for specified users in Apache:
(A) How to Set directory in httpd. conf of Apache:
Php_admin_value open_basedir/usr/local/Apache/htdocs/
# To set multiple directories, refer to the following:
Php_admin_value open_basedir/usr/local/Apache/htdocs/:/tmp/
(B) How to Set virtualhost in httpd. conf of Apache:
Php_admin_value open_basedir/usr/local/Apache/htdocs/
# To set multiple directories, refer to the following:
Php_admin_value open_basedir/var/www/html/:/var/tmp/
(C) Because open_basedir is set in virtualhost, this virtual user will not inherit PHP. ini automatically.
Open_basedir setting value in, which makes it difficult to achieve flexible configuration measures. Therefore, we recommend that you do not
For example, you can set open_basedir =.:/tmp/in PHP. ini.
Access the current directory (the directory where the PHP script file is located) And/tmp/directory.
Note: If the temporary directory for uploading files set in PHP. INI is/tmp/, open_basedir must be set.
Contains/tmp/, otherwise the upload will fail. The new PHP version will prompt "open_basedir restriction in effect"
Warning, but the move_uploaded_file () function can still successfully retrieve the uploaded files in the/tmp/directory.
This is a vulnerability or a new feature.
Shopex472 Configuration:
Open_basedir = "D:/server ;.. /CATALOG ;.. /include ;.. /.. /home ;.. /syssite ;.. /templates ;.. /language ;.. /.. /language ;.. /.. /.. /language ;.. /.. /.. /.. /language"