(Seemingly) no matter what command I try to run with PHP's system
function, the command always does nothing and then fails with exit code 1. For example,
system("echo 'this should definitely work'", $retval);
sets $retval = 1
. So does
system("dir", $retval);
as well as running an executable that I've written; when I run
vfmt -h cat.v
from cmd.exe
the command works and returns with exit code 0, but running
system("vfmt -h cat.v", $retval);
again sets $retval = 1
. This vfmt.exe
file is in the same directory as the src.php
script that is attempting these system
calls.
I am nearly at my wit's end trying to figure out what's wrong. What could possibly be causing this issue?