I can use the following bash script to start severals terminals at once:
for i in 0 1 2 3; do urxvt -name Terminal$i&; done
But if I try to run that bash script from a PHP script if fails with error:
sh: -c: line 0: syntax error near unexpected token `;'
sh: -c: line 0: `for i in 0 1 2 3; do urxvt -name Terminal$i&; done'
PHP Script:
<?php
system('for i in 0 1 2 3; do urxvt -name Terminal$i&; done');
?>
This fails, too:
<?php
exec('for i in 0 1 2 3; do urxvt -name Terminal$i&; done');
?>
Without '&' no errors occurs but I want to start all in background. Escaping the '&' results in an invalid argument error of urxvt.
Any ideas??