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:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: (...) Couldn't connect to SQL Server
ntwdblib.dll is the correct version (2000.80.194.0)
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)
I've downgraded back to wampserver 2.1e & php 5.3.1 (some people got it working like this)
there are no errors on the apache_error.log when I restart the wamp server
installing freetds on my machine hangs apache
remote machine successfully uses php_mssql.dll (linux server)
The code I'm using:
<?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");
?>
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).
My system: Windows 7, Wampserver 2.1e, PHP 5.3.1
What else can I try? :(