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?

http://php.net/manual/en/function.pcntl-fork.php


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

java - How to create Table using Apache PDFBox -

mpi - Why is MPI_Bsend not returning error even when the buffer is insufficient to accommodate all the messages -