title: php mssql extension on wamp
body: <p>I'm trying to get wamp php to communicate with an MsSQL DB but I can't seem to make it work. The current error message I get on the browser (Chrome) is: </p>
  
  <pre><code>Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: (...) Couldn't connect to SQL Server
  </code></pre>
  
  <ol>
  <li><p>ntwdblib.dll is the correct version (2000.80.194.0)</p></li>
  <li><p>I can't use php_sqlsrv (the deployment server is linux only, sqlsrv is windows only), although from using sqlsrv I can conclude that the access info is correct (server, user, password)</p></li>
  <li><p>I've downgraded back to wampserver 2.1e &amp; php 5.3.1 (some people got it working like this)</p></li>
  <li><p>there are no errors on the apache_error.log when I restart the wamp server</p></li>
  <li><p>installing freetds on my machine hangs apache</p></li>
  <li><p>remote machine successfully uses php_mssql.dll (linux server)</p></li>
  </ol>
  
  <p>The code I'm using:</p>
  
  <pre><code>&lt;?php
  $dbhandle = mssql_connect($ip,$user,$pass) or die("Couldn't connect to SQL Server on $ip"); 
  $selected = mssql_select_db($dbname,$dbhandle) or die("Couldn't open database at SQL server: $ip");
  ?&gt;
  </code></pre>
  
  <p>I am now going to try a linux virtual machine, but surely even if that works it will be a pain (slow and feature-less).</p>
  
  <p>My system: Windows 7, Wampserver 2.1e, PHP 5.3.1</p>
  
  <p>What else can I try? :(</p>