I am executing a C program i.e. '.exe' that is an executable file from PHP.
I have an interface with an HTML which calls a PHP file whenever I click a button.
On PHP, it calls up a shell script. So on PHP, I use the following:
echo shell_exec('sh auto_script.sh');
The shell file executes the program .exe as follows:
./import -file.txt
where import
is my executable C program .exe and file.txt is an input which I am hard coding as of now.
Executable file 'import' is stored in the same direcotry as php file called.
When I execute the shell script on a terminal, it executes properly with the necessary output.
But when I try to execute it from PHP it doesnt work. I have given full permissions to file as of now.