title: Windows/php pclose and popen issue
body: <p>Here is my code:</p>
  
  <pre><code>&lt;?php
      require_once 'dbconnect.php';
      function execInBackground($cmd) { 
          if (substr(php_uname(), 0, 7) == "Windows"){ 
              pclose(popen("start /B ". $cmd, "r"));  
          } 
          else { 
              exec($cmd . " &gt; /dev/null &amp;");   
          } 
      } 
  
      if(isset($_GET['date'])){
          //CHECK LOCK
          $checkLock = "Select IS_FREE_LOCK('overnight') as `lock`;";
          $result = mysql_query($checkLock) or die(mysql_error());
          while($information = mysql_fetch_array($result)){
              if($information['lock'] == 0){
                  die('Overnight is already running, please try again later.');
              }
          }
          execInBackground("php overnightQueries.php {$_GET['date']}");
          //echo "&lt;pre&gt;".print_r($output2, true)."&lt;/pre&gt;";
          header('Refresh: 3; url=index.php');
          die('running queries...');
      }
      else {
  
          die('PLEASE SET DATE');
  
      }
  ?&gt;
  </code></pre>
  
  <p>I am using a windows machine.</p>
  
  <p>I get the following warnings: </p>
  
  <blockquote>
    <p>Warning: popen(start /B php overnightQueries.php 2011_08_12,r): No error in C:\inetpub\GTSA\runOvernight.php on line 5</p>
  </blockquote>
  
  <p>AND:</p>
  
  <blockquote>
    <p>Warning: pclose() expects parameter 1 to be resource, boolean given in C:\inetpub\GTSA\runOvernight.php on line 5</p>
  </blockquote>