title: PHP proc_open problems on windows
body: <p>I have the following code</p>
  
  <pre><code>$env=array('PATH'=&gt;'C:\Program Files\MySQL\MySQL Server 5.1\bin',
             'PATHEXT' =&gt; '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC');
  $cmd='mysql "--port=3306" "--host=127.0.0.1" "--user=root" "--password=xxxx" &lt;"C:\Projects/script.sql" 2&gt;&amp;1';
  print $cmd;
  $proc = proc_open($cmd, $descriptorspec, $pipes, NULL, $env) or die("Cannot run $cmd");
  
  while ($line=fgets($pipes[1])) print $line;
  
  print "\n\nCompleted\n";
  </code></pre>
  
  <p>And the output I get is</p>
  
  <pre><code>ERROR 2004 (HY000): Can't create TCP/IP socket (10106)
  </code></pre>
  
  <p>Why is the port option being ignored? The command works perfectly well on the command line.</p>