Here is the program listed below. I am trying to run the shell command from php so I have written the following code:
<?php
$argument1 = $argv[1];
$output = shell_exec('sudo whois ');
echo "<pre>$output</pre>";
?>
But every time I execute the command it get executed but doesn't display output. Only shows the option.
My command in shell is
php filename.php google.com
sudo-ing commands from php, with no way of bashing in the password??