how can I execute a php command line script from a web call
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/10431938/php-exec-function-and-different-hosts">php exec() function and different hosts</a>  </p>
</blockquote>



<p>I have a web app that when save button is clicked it makes an ajax call to save.php. I want to be able to make a command line call for a command line only php script to run from inside of the save.php file. </p>

<p>ex.</p>

<pre><code>some code to make a db call and update db

exec('PathToPHP /path/to/file/refresh.php');
</code></pre>

<p>I have tried this and it does not work.</p>

<p>does anyone have a good solution?</p>

<p>thanks</p>
