It seems that glob and file_exists functions are also restricted in 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() | Checks whether the directory in which the script is operating has the same UID (owner) as the script that is being executed. |
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() | Checks whether the directory in which the script is operating has the same UID (owner) as the script that is being executed. |
dl() | Ця функція блокується, коли PHP запускається в безпечному режимі. |
backtick operator | Ця функція блокується, коли PHP запускається в безпечному режимі. |
shell_exec() (functional equivalent of backticks) | Ця функція блокується, коли PHP запускається в безпечному режимі. |
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() | Checks whether the directory in which the script is operating has the same UID (owner) as the script that is being executed. |
mkdir() | Checks whether the directory in which the script is operating has the same UID (owner) as the script that is being executed. |
rmdir() | Checks whether the directory in which the script is operating has the same UID (owner) as the script that is being executed. |
rename() | Перевіряє, чи мають файли/директорії, з якими ви збираєтесь працювати, такий же UID (власника), що і скрипт, який буде виконуватись. Checks whether the directory in which the script is operating has the same UID (owner) as the script that is being executed. |
unlink() | Перевіряє, чи мають файли/директорії, з якими ви збираєтесь працювати, такий же UID (власника), що і скрипт, який буде виконуватись. Checks whether the directory in which the script is operating has the same UID (owner) as the script that is being executed. |
copy() | Перевіряє, чи мають файли/директорії, з якими ви збираєтесь працювати,
такий же UID (власника), що і скрипт, який буде виконуватись. Checks whether the directory in which
the script is operating has the same UID (owner) as the script that is being
executed. (on
source and
target ) |
chgrp() | Перевіряє, чи мають файли/директорії, з якими ви збираєтесь працювати, такий же UID (власника), що і скрипт, який буде виконуватись. |
chown() | Перевіряє, чи мають файли/директорії, з якими ви збираєтесь працювати, такий же UID (власника), що і скрипт, який буде виконуватись. |
chmod() | Перевіряє, чи мають файли/директорії, з якими ви збираєтесь працювати, такий же UID (власника), що і скрипт, який буде виконуватись. In addition, you cannot set the SUID, SGID and sticky bits |
touch() | Перевіряє, чи мають файли/директорії, з якими ви збираєтесь працювати, такий же UID (власника), що і скрипт, який буде виконуватись. Checks whether the directory in which the script is operating has the same UID (owner) as the script that is being executed. |
symlink() | Перевіряє, чи мають файли/директорії, з якими ви збираєтесь працювати, такий же UID (власника), що і скрипт, який буде виконуватись. Checks whether the directory in which the script is operating has the same UID (owner) as the script that is being executed. (note: only the target is checked) |
link() | Перевіряє, чи мають файли/директорії, з якими ви збираєтесь працювати, такий же UID (власника), що і скрипт, який буде виконуватись. Checks whether the directory in which the script is operating has the same UID (owner) as the script that is being executed. (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 (власника), що і скрипт, який буде виконуватись. Checks whether the directory in which the script is operating has the same UID (owner) as the script that is being executed. |
parse_ini_file() | Перевіряє, чи мають файли/директорії, з якими ви збираєтесь працювати, такий же UID (власника), що і скрипт, який буде виконуватись. Checks whether the directory in which the script is operating has the same UID (owner) as the script that is being executed. |
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. |
session_start() | The owner of a script must be the same as owner of a session.save_path directory if the default files session.save_handler is used. |
All filesystem and stream functions. | Перевіряє, чи мають файли/директорії, з якими ви збираєтесь працювати, такий же UID (власника), що і скрипт, який буде виконуватись. Checks whether the directory in which the script is operating has the same UID (owner) as the script that is being executed. (see the safe_mode_include_dir php.ini option. |
refers to the previuos posting of
bananarama
15-May-2006 10:11
"all file-handling and -management functions are restricted, just in case someones wondering why they're not listed here.
a script can run these functions on files without errors, if the files were created (are owned) by the same UID, the script was created (is owned) by."
.... or if the directory, in which the file is located, has the same UID as the script, which tries to use a file in that directory...