In Ubuntu how can I execute multiple simultaneous terminals from PHP? -
i have script in php run cli.
inside script have following loop:
foreach($array $key => $value){ exec("gnome-terminal -e php myscript.php $key $value > /dev/null"); }
what expecting happen new terminal pop , run script , related arguments simultaneously in separate terminal windows.
being able visualize data debugging. after confirm script working correctly, want run in background command:
exec("php myscript.php $key $value" > /dev/null &);
however, neither working expected. second command, though runs, still waits first script finish before goes next iteration of loop.
i'm using ubuntu 12.04. how can these run simultaneously debugging, , simultaneously , silently in background when not?
since you're running php process, have considered using fork?