I have a PHP-code which is as follows:-
<html>
<?php
$output = shell_exec("/home/ak/Documents/Translation/mosesdecoder/bin/moses");
echo $output;
?>
</html>
When, I execute this PHP file through browser, no output appears on the browser window. However, I have done chmod -R 775 /home/ak/Documents/Translation/
and thus I know that moses
can be executed by everyone.
Further to confirm that the user www-data
(the web user) has permissions to execute moses
, I executed moses
in the my Ubuntu terminal using
sudo -u www-data /home/ak/Documents/Translation/mosesdecoder/bin/moses
and an output, describing how to use the program moses
, appeared on the terminal.
Why is the same output not appearing on the browser, when www-data
has the permission?
Thakns in advance.