ini_set('max_execution_time', 864000);
$seq = "D:/Ractip/Sequence.txt";
$mir = "D:/Ractip/mirhominid.txt";
$shandle = fopen($seq, 'r');
$sdata = fread($shandle, filesize($seq));
$mhandle = fopen($mir, 'r');
$mdata = fread($mhandle, filesize($mir));
$sexp = explode(">", $sdata);
$mexp = explode(">", $mdata);
$i = 1;
$a = 1;
$count = count($sexp);

while($i < $count)
$name = explode("\n", $mexp[$a]);
$name = explode(" ", $name[0]);
$name1 = explode("\n", $sexp[$i]);

$file2 = "D:\Ractip\mir\\"."$name[1]".".txt";
$file1 = "D:\Ractip\sequence\\"."name1[0]".".txt";

if ($i == 1)
mkdir("D:/Ractip/Interactions/"."$name[1]", 0777);
$file = "D:/Ractip/Interactions/"."$name[1]"."/"."$name1[0]"."+"."$name[1]".".txt";
$fhandle = fopen($file, 'w');
$query = "ractip "."$file1".".txt"." "."$file2".".txt";

$exec = exec($query);
print $exec;
fwrite($fhandle, $exec);
if ($i == $count)
$i = 1;


this is the script, i am basically using a tool to get results of roughly 37.5 million combinations, so as u can understand it isn't something that i can do on my own, therefore came along this script, previously i separated all candidates into individual files and so that is the explanation for the $name variables im calling them that way.

The problem is the shell_exec command, a preliminary google search really did not explain why it is behaving this way, but shell_exec refuses to process dynamic commands, instead if i were to make a static command like "ractip xy.txt zy.txt" it will process that, what i need to do is build the command and then make the shell_exec process it, which it unfortunately isn't doing.