I want to execute a simulation program in PHP which is already installed the pc root. that means, I can execute it in any directory. I tried to execute it using shell_exec but I cant see any output, while when I run it from terminal it works anywhere. this program also will generate an image which later I want it to appear in the page which is not a big deal. but the problem is there is just an empty image created and no output values.
<?php
$output = exec('rpict -vp 0 0 0 -vd 0.01 0 1 -ab 2 -ad 2048 -ar 64 -as 64 -aa 0.1 -vv 180 -vh 180 -vth with_sun_12_30_13_30.oct > test.hdr');
echo "<pre>$output</pre>";
?>