PHP exec not working for command that works in bash and python -




so i'm not sure what's going here , cannot figure out why.

the command:

echo shell_exec('wine /var/www/exes/validate_file.exe /var/www/exes/test_files/test1.txt'); 

outputs nothing (i expect printing "ok"). running same command through python os.system shows expected output ("ok") , on bash command line.

if run different exe through wine, works expected, i'm not sure what's going on, permissions fine (i've tried 777 on both exe , txt, , wine worked different exe). i've tried putting command python file , wrapping php didn't produce output.

the string exec ( string $command [, array &$output [, int &$return_var ]] ) has 3 arguments , result last line result of command. possible empty result if last line empty. output of executed command, sure set , use output parameter. status of command use return_var argument. if return_var argument present along output argument, return status of executed command written variable. if need execute command , have data command passed directly without interference, use passthru() function.

learn more shell_exec() in php manuel





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -