I have external program.exe inside my website that gets data from text file, process it and then output to another textfile.
Since apache uses www-data as user account, i manage to log in to terminal using www-data, configure it to execute program.exe and it worked. But when i run program.exe using php exec, it does not work.
I use 'whoami' to determine the user account on the job, it outputted www-data.
.exe
binary? That's not going to work.program.exe
? Is it a proper linux binary? If so, you're going to want to remove the.exe
extension, as it'll only serve to confuse things. Typically only windows binaries have that extension. Linux binaries don't need an extension at all, but if it makes you feel better, use something like.bin
, or.run
.