Based on certain form entries from a PHP front end user form, I need to persist the data in a file (already achieved) and after which execute a shell script as an action. I am able to write to a file from PHP however I am not able to trigger another file of the same directory with exactly same permissions for both. I have tried both exec and shell_exec, but doesn't seems to help ! Some of the sample tried includes -
shell_exec("/bin/sh dq_files/shell_script.sh");
shell_exec("./dq_files/shell_script.sh");
shell_exec("sh dq_files/shell_script.sh");
exec("<similar-shell-functions-as-above>, $result, $output);
All of which didn't help.
Note - My php.ini file's disable_functions is empty (disable_functions=) and my PHP's Safe mode is Off. The PHP is being executed by apache user and apache group, I have updated all files in that directory and till the lowest hierarchy with 777 permissions and ownership has been transferred to apache:apache, but didn't seem to benefit.