hello guys,
I am using PHP to run a script, called server.php
If I run the script server.php, from ANY user it should work, which does when I do it on the command prompt.
But when I access server.php from apache,
www.site.com/server.php, it will not excute the command.
Apache is also allowed to access the script (i tried it on command prompt).
the server.php simply excutes another script (qtpasswd, quicktime streaming server).
server contains:
PHP Code:
echo "qtpasswd -f /home/ashow/qtusers aziz2 -p aziz2<br/>";
if(!shell_exec("qtpasswd -f /home/ashow/qtusers aziz2 -p aziz2")){
$body .= "Failed shell_exec, trying exec:<br/>";
if(!exec("qtpasswd -f /home/ashow/qtusers aziz2 -p aziz2")){
$body .= "Failed exec, trying passthrough:<br/>";
if(!passthru("qtpasswd -f /home/ashow/qtusers aziz2 -p aziz2")){
$body .= "all failed<br/>";
} else {
$body .= "passthru passed";
}
} else {
$body .= "Passed exec";
}
} else {
$body .= "Passed shell_exec";
}
whic also tries various methods of excution but it does not work..
keep in mind that when I do excute other scripts, they do work (ls,whoami)..
appreciate any help
Peace,