Problems executing a .exe file using external execution cmds
Posted: Tue Feb 15, 2005 8:27 am
Hi,
I've tried using exec(), system(), passthru() and shell_exec() on a binary .exe file with PHP safemode off, however none of the commands are producing and output and therefore don't seem to be executing the file. Here's the code (ignore the complexities of the parameters). I know this command works because it outputs when run directly from a UNIX shell window, it's just when I try and run it under PHP, it doesn't output anything and doesn''t run.
Any ideas? Do I have to set a PHP_exec directory or something?
Cheers
Mark
I've tried using exec(), system(), passthru() and shell_exec() on a binary .exe file with PHP safemode off, however none of the commands are producing and output and therefore don't seem to be executing the file. Here's the code (ignore the complexities of the parameters). I know this command works because it outputs when run directly from a UNIX shell window, it's just when I try and run it under PHP, it doesn't output anything and doesn''t run.
Code: Select all
$output = shell_exec('/sample_gals_shortcut4.exe /gal/r2/cmb/Grasil_Out//eGalform_Cole2000/z/cat 0 1 0.0 -9931 AB dust/dust_MW_hz1.0.dat 0 1 0.25 file /usr/local/www/galform/Junk/table_junk range mstars_total 0.0 1.e+10 props weight mstars_total magK_tot_ext >&! /usr/local/www/galform/Junk/table_junk');Cheers
Mark