Functions restricted/disabled by safe mode
This is a still probably incomplete and possibly incorrect listing of the functions limited by safe mode.
| Function | Limitations |
|---|---|
| dbmopen() | 檢查被操作的文件或目錄是否與正在執行的腳本有相同的 UID(擁有者)。 |
| dbase_open() | 檢查被操作的文件或目錄是否與正在執行的腳本有相同的 UID(擁有者)。 |
| filepro() | 檢查被操作的文件或目錄是否與正在執行的腳本有相同的 UID(擁有者)。 |
| filepro_rowcount() | 檢查被操作的文件或目錄是否與正在執行的腳本有相同的 UID(擁有者)。 |
| filepro_retrieve() | 檢查被操作的文件或目錄是否與正在執行的腳本有相同的 UID(擁有者)。 |
| ifx_* | sql_safe_mode restrictions, (!= safe mode) |
| ingres_* | sql_safe_mode restrictions, (!= safe mode) |
| mysql_* | sql_safe_mode restrictions, (!= safe mode) |
| pg_lo_import() | 檢查被操作的文件或目錄是否與正在執行的腳本有相同的 UID(擁有者)。 |
| posix_mkfifo() | 檢查被操作的目錄是否與正在執行的腳本有相同的 UID(擁有者)。 |
| putenv() | Obeys the safe_mode_protected_env_vars and safe_mode_allowed_env_vars ini-directives. See also the documentation on putenv() |
| move_uploaded_file() | 檢查被操作的文件或目錄是否與正在執行的腳本有相同的 UID(擁有者)。 |
| chdir() | 檢查被操作的目錄是否與正在執行的腳本有相同的 UID(擁有者)。 |
| dl() | 本函式在安全模式下被禁用。 |
| backtick operator | 本函式在安全模式下被禁用。 |
| shell_exec() (functional equivalent of backticks) | 本函式在安全模式下被禁用。 |
| exec() | You can only execute executables within the safe_mode_exec_dir. For practical reasons it's currently not allowed to have .. components in the path to the executable. escapeshellcmd() is executed on the argument of this function. |
| system() | You can only execute executables within the safe_mode_exec_dir. For practical reasons it's currently not allowed to have .. components in the path to the executable. escapeshellcmd() is executed on the argument of this function. |
| passthru() | You can only execute executables within the safe_mode_exec_dir. For practical reasons it's currently not allowed to have .. components in the path to the executable. escapeshellcmd() is executed on the argument of this function. |
| popen() | You can only execute executables within the safe_mode_exec_dir. For practical reasons it's currently not allowed to have .. components in the path to the executable. escapeshellcmd() is executed on the argument of this function. |
| fopen() | 檢查被操作的目錄是否與正在執行的腳本有相同的 UID(擁有者)。 |
| mkdir() | 檢查被操作的目錄是否與正在執行的腳本有相同的 UID(擁有者)。 |
| rmdir() | 檢查被操作的目錄是否與正在執行的腳本有相同的 UID(擁有者)。 |
| rename() | 檢查被操作的文件或目錄是否與正在執行的腳本有相同的 UID(擁有者)。 檢查被操作的目錄是否與正在執行的腳本有相同的 UID(擁有者)。 |
| unlink() | 檢查被操作的文件或目錄是否與正在執行的腳本有相同的 UID(擁有者)。 檢查被操作的目錄是否與正在執行的腳本有相同的 UID(擁有者)。 |
| copy() | 檢查被操作的文件或目錄是否與正在執行的腳本有相同的 UID(擁有者)。 檢查被操作的目錄是否與正在執行的腳本有相同的 UID(擁有者)。 (on source and target ) |
| chgrp() | 檢查被操作的文件或目錄是否與正在執行的腳本有相同的 UID(擁有者)。 |
| chown() | 檢查被操作的文件或目錄是否與正在執行的腳本有相同的 UID(擁有者)。 |
| chmod() | 檢查被操作的文件或目錄是否與正在執行的腳本有相同的 UID(擁有者)。 In addition, you cannot set the SUID, SGID and sticky bits |
| touch() | 檢查被操作的文件或目錄是否與正在執行的腳本有相同的 UID(擁有者)。 檢查被操作的目錄是否與正在執行的腳本有相同的 UID(擁有者)。 |
| symlink() | 檢查被操作的文件或目錄是否與正在執行的腳本有相同的 UID(擁有者)。 檢查被操作的目錄是否與正在執行的腳本有相同的 UID(擁有者)。 (note: only the target is checked) |
| link() | 檢查被操作的文件或目錄是否與正在執行的腳本有相同的 UID(擁有者)。 檢查被操作的目錄是否與正在執行的腳本有相同的 UID(擁有者)。 (note: only the target is checked) |
| apache_request_headers() | In safe mode, headers beginning with 'authorization' (case-insensitive) will not be returned. |
| header() | In safe mode, the uid of the script is added to the realm part of the WWW-Authenticate header if you set this header (used for HTTP Authentication). |
| PHP_AUTH variables | In safe mode, the variables PHP_AUTH_USER, PHP_AUTH_PW, and AUTH_TYPE are not available in $_SERVER. Regardless, you can still use REMOTE_USER for the USER. (note: only affected since PHP 4.3.0) |
| highlight_file(), show_source() | 檢查被操作的文件或目錄是否與正在執行的腳本有相同的 UID(擁有者)。 檢查被操作的目錄是否與正在執行的腳本有相同的 UID(擁有者)。 (note: only affected since PHP 4.2.1) |
| parse_ini_file() | 檢查被操作的文件或目錄是否與正在執行的腳本有相同的 UID(擁有者)。 檢查被操作的目錄是否與正在執行的腳本有相同的 UID(擁有者)。 (note: only affected since PHP 4.2.1) |
| set_time_limit() | Has no effect when PHP is running in 安全模式. |
| max_execution_time | Has no effect when PHP is running in 安全模式. |
| mail() | In safe mode, the fifth parameter is disabled. (note: only affected since PHP 4.2.3) |
| Any function that uses php4/main/fopen_wrappers.c | ?? |