I have this problem: On a ISS web server, windows 7 x64 professional, zend server installed. Running this command under php:
exec(\'dir\',$output, $err);
>
Take a look at Apache error_log, maybe you'll find the error message.
Also, you can try using popen instead of exec. It gives more control because you can separate process start from output read:
$p = popen("dir", "r");
if (!$p)
exit("Cannot run command.\n");
while (!feof($p))
echo fgets($p);
pclose($p);