I'm trying to use PHP with an Microsoft SQL Database but keep getting the following error:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server
I've included extension=php_mssql.dll in php.ini, and have SQL components installed on the web server. Does anybody know what else I need to be doing? I'm all out of ideas.
MS SQL Server and PHP
Moderator: General Moderators
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
RE: MS SQL and PHP
I'm pretty sure that information is correct. I've tried different variations of the following including different users etc.
$server = "xxx.x.xx.x:1433";
$user = "sa";
$pword = "pass";
$conn = mssql_connect($server, $user, $pword))
$server = "xxx.x.xx.x:1433";
$user = "sa";
$pword = "pass";
$conn = mssql_connect($server, $user, $pword))
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm