title: PHP timeout running MSSQL SP
body: <p>I am trying to run a MSSQL stored procedure from PHP using PDO. I do this all the time but with this SP it's timing out. The SP is rather complex and takes about 4 minutes to run.</p>
  
  <p>I am calling it like this:</p>
  
  <pre><code>$setDate = '2014-01-03';
  
  $queryMain = $coreDB-&gt;prepare("exec sp_ard :runDate");
  $queryMain-&gt;bindParam("runDate",$setDate);
  $queryMain-&gt;execute();
  
  $e = $queryMain-&gt;errorInfo();
  $d = $queryMain-&gt;fetchAll(PDO::FETCH_ASSOC);
  
  print_r($e);
  print_r($d);
  </code></pre>
  
  <p>When I run the page it runs for a minute or so then produces this error:</p>
  
  <pre><code>Array ( [0] =&gt; 08S01 [1] =&gt; 258 [2] =&gt; [Microsoft][SQL Server Native Client 10.0]TCP Provider: Timeout error [258]. ) 
  </code></pre>
  
  <p>I know the SP works fine. I can run it straight from the MSSQL management console. It takes about 4 minutes to run from there but it works fine.</p>
  
  <p>I am trying to figure out how I can run this from PHP.</p>
  
  <p>Any help would be great.</p>
  
  <p>Thanks!</p>