title: php against sql server 2005 is timing out
body: <p>I'm running a php script from the command line against SQL server 2005 using the MS driver for PHP and getting time outs. The query takes about 2 minutes from SQL Server Management Studio and returns > 300,000 rows.</p>
  
  <p>There are multiple queries in the script and for each one I do a <code>sqlsrv_connect()</code>, execute the query and then <code>sqlsrv_free_stmt()</code> and <code>sqlsrv_close()</code></p>
  
  <p>Output from <code>sqlsrv_errors():</code></p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [0] =&gt; 08S01
              [SQLSTATE] =&gt; 08S01
              [1] =&gt; 258
              [code] =&gt; 258
              [2] =&gt; [Microsoft][SQL Native Client]Shared Memory Provider: Timeout error [258]. 
              [message] =&gt; [Microsoft][SQL Native Client]Shared Memory Provider: Timeout error [258]. 
          )
      [1] =&gt; Array
          (
              [0] =&gt; 08S01
              [SQLSTATE] =&gt; 08S01
              [1] =&gt; 258
              [code] =&gt; 258
              [2] =&gt; [Microsoft][SQL Native Client]Communication link failure
              [message] =&gt; [Microsoft][SQL Native Client]Communication link failure
          )
      [2] =&gt; Array
          (
              [0] =&gt; 08S01
              [SQLSTATE] =&gt; 08S01
              [1] =&gt; 0
              [code] =&gt; 0
              [2] =&gt; [Microsoft][SQL Native Client]Communication link failure
              [message] =&gt; [Microsoft][SQL Native Client]Communication link failure
          )
  ) 
  </code></pre>