I am trying to get wamp php to communicate with MsSQL DB, but I can not get it to work. The current error message that I get in the browser (Chrome):
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 not use php_sqlsrv (deployment server - only linux, sqlsrv - only windows), although from the use of sqlsrv I can conclude that the access information is correct (server, user, password)
I switched to wampserver 2.1e and php 5.3.1 (some people worked it like this)
errors in apache_error.log when restarting wamp server
installing freetds on my machine freezes apache
the remote computer successfully uses php_mssql.dll (linux server)
The code I'm using is:
<?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");
?>
linux, , , , ( ).
: Windows 7, Wampserver 2.1e, PHP 5.3.1
?: (