title: How to execue PHP scripts in the background using EXEC() and CMD
body: <p>I can't use the <code>$com = new Com('WScript.shell');</code> way, it's causing problems on my system. Probably I need to upgrade my PHP because it's very old (5.2), but I suppose what I'm trying to do is not version dependent.</p>
  
  <p>I'm running PHP on Windows 2008 64-bit. Where I can run a command prefixed with <code>start</code> to run the command on a separate console.</p>
  
  <pre><code>start php myscript.php
  </code></pre>
  
  <p>If this is executed from the command line, it starts a new console for the script.</p>
  
  <p>I need to do the same from PHP using <a href="http://php.net/manual/en/function.exec.php" rel="nofollow">exec</a> <strong>only</strong>.</p>
  
  <pre><code>exec("CMD /C start php myscript.php");
  </code></pre>
  
  <p><code>/C</code> is to terminate the CMD session when the script finishes.</p>
  
  <p>But it's not giving the same results, it still waits for the script to terminate !</p>