shell - PHP System Call Always Fails -
(seemingly) no matter command try run php's system function, command nothing , fails exit code 1. example,
system("echo 'this should work'", $retval); sets $retval = 1. does
system("dir", $retval); as running executable i've written; when run
vfmt -h cat.v from cmd.exe command works , returns exit code 0, running
system("vfmt -h cat.v", $retval); again sets $retval = 1. vfmt.exe file in same directory src.php script attempting these system calls.
i @ wit's end trying figure out what's wrong. possibly causing issue?
you should check php.ini line next:
disable_functions =exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source ^^^^ ^^^^^^^^^^^^^^^^^^ and such.
also check "safe mode" status, (php ver. < 5.4) if have enabled can execute files within safe_mode_exec_dir , on...
more information in doc , execution of commands here , system here.
Comments
Post a Comment