I have a php code:
<?php
$res = "";
exec("./a.out>temp", $res);
print_r(error_get_last());
print_r($res);
?>
a.out is a simple c++ program creating a socket. when I call this php code from browser an error of "Permission denied" is printed in the "temp" file.
I know this is a problem related to the right of apache user, but how to solve it?
Note: I have redirected the stderr into the "temp" file so that I can see what is wrong.
Thanks.