Problem with exec, shell_exec

From: Date: Fri, 18 May 2001 12:38:13 +0000
Subject: Problem with exec, shell_exec
Groups: php.general 
Request: Send a blank email to php-general+get-53397@lists.php.net to get a copy of this message
below you'll see a bit of code that is not working for me. I have tried exec, shell_exec, passthru, system. nothing works. If I copy the echoed copy of the command and paste it in an SSH session it works 100%. all of the exec, and such use the 'sh' shell. So I changed to that shell to verfy that it is working and it still works great in SSH but only halfway in the script. The command will create the needed directories but then it quits. It doesn't finish the job. $pass_string = "caddvsite -i ".$IP." -n www -d ".$domain; if($email=="y")$pass_string .= " -e"; if($web=="y")$pass_string .= " -w"; $pass_string .= " -q ".$Quota." -u ".$Users; if($cgi=="y")$pass_string .= " -c"; if($ssi=="y")$pass_string .= " -s"; if($frontp=="y")$pass_string .= " -x"; if($ssl=="y")$pass_string .= " -l"; if($apop=="y")$pass_string .= " -o"; if($ftp=="y")$pass_string .= " -f"; if($telnet=="y")$pass_string .= " -t"; # $pass_string .= " &"; echo"$pass_string"; # system("touch /forbidden 2>&1"); # printf("%s",system($pass_string)); exec( EscapeShellArg($pass_string) ); Any ideas appreciated. chuck

« previous php.general (#53397) next »