I am trying to execute multiple commands one after another, but php stops after the first exec(). The first program get executed but the next one doesn't. I tryied changing exec() to system() and the end of the programs output is never printed. Is there a php time out for processing commands on a command line. I have php 4.1.1 running on RedHat 6.2. Below are the lines that it is hanging at:
$command = "/usr/bin/sudo /usr/sbin/software_ctl -i 3";
$command2 = "/usr/bin/sudo /usr/sbin/system_ctl -f reload";
exec(escapeshellcmd($command1), $data, $ret);
exec(escapeshellcmd($command2), $data2, $ret2);