SunnyByfleet
Technical User
If I run the following script on my Plesk 10.2 linux server:
$c = system("ls");
echo "<br />SYSTEM: ".$c;
$out = array();
$d = exec("ls",$out);
echo "<br />EXEC: ".$d;
echo "<hr /><pre>";
print_r($out);
echo "</pre>";
I get nothing. Well, I get the following:
SYSTEM:
EXEC:
--------------------------------------------------------------------------------
Array
(
)
However, if I run the script on local WAMP server, it works fine (obviously changing ls for dir).
I have checked on the web, and the general opinion is that I am running in safe mode. However, checking phpinfo on the plesk server reveals the following:
Setting - Local - Master
safe_mode - Off - On
safe_mode_exec_dir - no value - no value
safe_mode_gid - Off - Off
safe_mode_include_dir -no value - no value
So safe mode is definately off.
Does anybody know why EXEC or SYSTEM don't work?
Incidently, the reason I want to use EXEC is because I want to let users do table backups using mysqldump.
$c = system("ls");
echo "<br />SYSTEM: ".$c;
$out = array();
$d = exec("ls",$out);
echo "<br />EXEC: ".$d;
echo "<hr /><pre>";
print_r($out);
echo "</pre>";
I get nothing. Well, I get the following:
SYSTEM:
EXEC:
--------------------------------------------------------------------------------
Array
(
)
However, if I run the script on local WAMP server, it works fine (obviously changing ls for dir).
I have checked on the web, and the general opinion is that I am running in safe mode. However, checking phpinfo on the plesk server reveals the following:
Setting - Local - Master
safe_mode - Off - On
safe_mode_exec_dir - no value - no value
safe_mode_gid - Off - Off
safe_mode_include_dir -no value - no value
So safe mode is definately off.
Does anybody know why EXEC or SYSTEM don't work?
Incidently, the reason I want to use EXEC is because I want to let users do table backups using mysqldump.