Hello,
I intend to execute a shell script from PHP using shell_exec() in a simple file as follows:
<?php $result = shell_exec('sh /var/www/script.sh');
echo "<p>$res</p>;
?>
This fails to produce any sort of output!
I have manually executed the script from the shell of the PHP web-server and it works fine and so there is supposedly no problem with the shell script.
Moreover, I have also tested the shell script execution in a PHP file with shell_exec('ls -altp'); and it worked fine producing the desired output. So, supposedly there are no shell script execution issues in my PHP environment.
Where should i search for to address this issue?
Your reply is highly appreciated!
Thanks!