Forum Moderators: coopster

Message Too Old, No Replies

shell exec

shell_exec, system, exec

         

yotam

12:06 pm on Jun 12, 2007 (gmt 0)

10+ Year Member



Hi,

I want to call an external console program and get its output, that's what I did:

execute.php :
<?php
$output = shell_exec('F:/Apache2/htdocs/misc/excecute.exe 8 6');
echo "<pre>$output</pre>";
?>

execute.exe :
is a console program which multiple argv[1] with argv[2] and printf the result, I have tested execute.exe in Dos mode - works perfectly, but when I run the php script, I get no output.

What's wrong?

phparion

12:55 pm on Jun 12, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



what is 8 and 6 in your command?

did you try something like

exec('start F:/Apache2/htdocs/misc/excecute.exe',$output);

eelixduppy

12:56 pm on Jun 12, 2007 (gmt 0)



yotam, do you have safe_mode enabled? Also, are you getting any errors in your error log?