I am running PHP 4.3.4 and the desktop edition of Sql Server 2000 (MSDE), along with Apache2. I have enabled the mssql functions and they all work fine.
My problem is I cannot connect to the local server through php using:
$host = "localhost";
$user = "sa";
$pass = "";
mssql_connect($host, $user, $pass);
and I recieve the message:
mssql_connect(): Unable to connect to server: localhost
I have tried the actual host name and the ip address.
I've also tried connecting through port 1433.
ex.
$host = "localhost,1433"; or
$host = "localhost:1433", or
$host = "HOSTNAME:1433", or
$host = "IPADDRESS";
Non of these seem to work.
When i try this on my server at work (SQL Server 2000, PHP 4.3.4, Apache2), everything works perfectly.
Has anyone successfully connected to an MSDE server through php locally and is this possible? If so, what did you do? Thanks in advance.