Collection of functions disabled when php is in safe mode

  • 2020-05-09 18:15:07
  • OfStack

 
<?php 
ini_set("safe_mode",true); 
?> 

Table 42-2. Security mode limiting functions

The function name limit dbmopen() Check whether the file or directory being manipulated has the same UID (owner) as the script being executed. dbase_open() Check whether the file or directory being manipulated has the same UID (owner) as the script being executed. filepro() Check whether the file or directory being manipulated has the same UID (owner) as the script being executed. filepro_rowcount() Check whether the file or directory being manipulated has the same UID (owner) as the script being executed. filepro_retrieve() Check whether the file or directory being manipulated has the same UID (owner) as the script being executed. ifx_* sql_safe_mode limit, (! = safe mode) ingres_* sql_safe_mode limit, (! = safe mode) mysql_* sql_safe_mode limit, (! = safe mode) pg_loimport() Check to see if the file or directory being manipulated has the same UID (owner) as the script being executed. posix_mkfifo() Check to see if the directory being manipulated has the same UID (owner) as the script being executed. putenv() Follow the safe_mode_protected_env_vars and safe_mode_allowed_env_vars options set by ini. Refer to the documentation for the putenv() function. move_uploaded_file() Check whether the file or directory being manipulated has the same UID (owner) as the script being executed. chdir() Check whether the directory being manipulated has the same UID (owner) as the script being executed. dl() This function is disabled in safe mode. backtick operator This function is disabled in safe mode. shell_exec() (functionally the same as the backticks function) This function is disabled in safe mode. exec() You can only perform operations in the directory set to safe_mode_exec_dir. For some reason, you cannot currently use.. in the path of an executable object. . escapeshellcmd() will be applied to the parameters of this function. system() You can only perform operations in the directory set to safe_mode_exec_dir. For some reason, you cannot currently use.. in the path of an executable object. . escapeshellcmd() will be applied to the parameters of this function. passthru() You can only perform operations in the directory set to safe_mode_exec_dir. For some reason, you cannot currently use.. in the path of an executable object. . escapeshellcmd() will be applied to the parameters of this function. popen() Operations can only be performed in a directory set to safe_mode_exec_dir. For some reason, you cannot currently use.. in the path of an executable object. . escapeshellcmd() will be applied to the parameters of this function. fopen() Check to see if the directory being manipulated has the same UID (owner) as the script being executed. mkdir() Check that the directory being manipulated has the same UID (owner) as the script being executed. rmdir() Check that the directory being manipulated has the same UID (owner) as the script being executed. rename() Check whether the file or directory being manipulated has the same UID (owner) as the script being executed. Check that the directory being manipulated has the same UID (owner) as the script being executed. unlink() Check whether the file or directory being manipulated has the same UID (owner) as the script being executed. Check that the directory being manipulated has the same UID (owner) as the script being executed. copy() Check whether the file or directory being manipulated has the same UID (owner) as the script being executed. Check whether the directory being manipulated has the same UID (owner) as the script being executed. (on < code > source < / code > and < code > target < / code >) chgrp() Verify that the file or directory being manipulated has the same UID (owner) as the script being executed. chown() Check whether the file or directory being manipulated has the same UID (owner) as the script being executed. chmod() Check whether the file or directory being manipulated has the same UID (owner) as the script being executed. Also, you cannot set SUID, SGID, and sticky bits touch() Check whether the file or directory being manipulated has the same UID (owner) as the script being executed. Check whether the directory being manipulated has the same UID (owner) as the script being executed. symlink() Check whether the file or directory being manipulated has the same UID (owner) as the script being executed. Check to see if the directory being manipulated has the same UID (owner) as the script being executed. (note: test target only) link() Check whether the file or directory being manipulated has the same UID (owner) as the script being executed. Check to see if the directory being manipulated has the same UID (owner) as the script being executed. (note: test target only) apache_request_headers() In safe mode, headers beginning with "authorization" (case sensitive) will not be returned. header() In secure mode, if WWW-Authenticate is set, the uid of the current script will be added to the realm portion of the header. PHP_AUTH variable In safe mode, variables PHP_AUTH_USER, PHP_AUTH_PW PHP_TYPE are not available in $_SERVER. However, you can still get the user name (USER) using REMOTE_USER. (note: PHP 4.3.0 only) highlight_file(), show_source() Check whether the file or directory being manipulated has the same UID (owner) as the script being executed. Check to see if the directory being manipulated has the same UID (owner) as the script being executed. (note that this is only valid after version 4.2.1) parse_ini_file() Check whether the file or directory being manipulated has the same UID (owner) as the script being executed. Check that the directory being manipulated has the same UID (owner) as the script being executed. (note that this is only valid after version 4.2.1) set_time_limit() Does not work in safe mode. max_execution_time Does not work in safe mode. mail() In safe mode, the fifth parameter is shielded. (note, only affected since PHP 4.2.3) Any function that USES php4/main/ fopen_wrappers.c ??

Related articles: