When I try to execute the C++, built by make, nothing happens. There is no error or anything, it's just not executing. When I try to execute a .sh file on the other hand (in the same path) it works just fine. I already configure php.ini and added execution permissions. I've already tried several functions(shell_exec, system) but none of them worked. I've read through the answers given by the duplicate, but none of the given ones worked.
C++ Binary file:
var_dump(exec('./ccontrol.exe neutral',$output,$return_val));
print($return_val);
print_r($output);
Output:
string(0) ""
139
Array ( )
Hello.sh
echo var_dump(exec('./hello.sh',$output,$return_val)); ?><br><?php
print($return_val); ?><br><?php
print_r($output);
Output:
string(10) "helo world"
0
Array ( [0] => helo world )