带有屏幕的PHP shell_exec和Ts3Musicbot

i am working on a Webinterface for some Ts3Musicbots and i have one Problem with starting the screen.

My code: ( stackoverflow )

$cmd = "screen -d -m -L $botverzeichnis /mb/$botverzeichnis/start.sh -account $botacc -secretkey $secretKey -port $botport -webif-pw $adminpw -webif-pw-user $userpw -max-disk-space 100 -noquery"; 
$redirect = '2>&1';
// using variable substitution only for readability here 
shell_exec("$cmd $redirect", $output);

And it dosen't start. When I print out $cmd and put it into Putty it works!

The directory whith the Start scrippt is at the moment in var/www/

Please Help ;)

Well, shell_exec returns the output and only has one parameter. It should be:

$cmd = "screen -d -m -L $botverzeichnis /mb/$botverzeichnis/start.sh -account $botacc -secretkey $secretKey -port $botport -webif-pw $adminpw -webif-pw-user $userpw -max-disk-space 100 -noquery"; 
$redirect = '2>&1';
// using variable substitution only for readability here 
$output = shell_exec("$cmd $redirect");

See http://php.net/manual/en/function.shell-exec.php