title: PHP ping script does not work after Apache restart in Centos
body: <p>My PHP ping script works fine before Apache restart but after restart it does not work.</p>
  
  <p>It shows</p>
  
  <pre><code>Array(
         )
  </code></pre>
  
  <p>My PHP script is</p>
  
  <pre><code>&lt;?php
  function pingAddress($ip) {
   exec('$ping -c 4 $ip', $outcome, $status);    
   print_r($outcome);
  }
  if(isset($_POST['ip'])){
   pingAddress($_POST['ip']);
  }
  ?&gt; 
  </code></pre>