I have one issue executing ‘ping’ on PHP, I received a blank result but if I execute other command like a ‘whoami’ I received a right result, Could you help me please? any Idea?
<?php
exec('ping google.com', $output);
echo $output;
//Result:
?>
<?php
exec('whoami', $output);
echo $output;
//Result: apache
?>
Thanks
Note: Maybe can be some from apache config? or php config? or linux permission?
Try this code.