title: How to get path of the php binary on server where it is located
body: <p>I am using the <code>exec</code> command as below in PHP :</p>
  
  <pre><code>exec("/usr/bin/php /path/to/Notification.php &gt;&gt; /path/to/log_file.log 2&gt;&amp;1 &amp;");
  </code></pre>
  
  <p>In my local environment (MAMP), I know the PHP installation path, so I can replace <code>/usr/bin/php</code> with <code>/Applications/MAMP/bin/php/php5.4.10/bin/php</code>. But I don't know where the PHP installation (PHP binary) is located on the production server.</p>