Hi. This is my first post, so please excuse any awkwardness...
I have installed PHP 4.3.4 as ISAPI on a WIN2000 box, along with MS SQL Server 2000. I followed the directions for installation from the zip file, making sure the PHP.ini file was edited and placed in WINNT & all the dll's were in the proper directories. The PHP checks out fine--simple scripts return echo commands, etc. Now I need to connect to a database to pass data back & forth. Here is the code in my HTML page, which is in C:\Inetpub\wwwroot:
<?php
$myServer = "localhost";
$myUser = "dave";
$myPass = "password";
$myDB = "Locality";
$s = @mssql_connect($myServer, $myUser, $myPass)
or die("Couldn't connect to SQL Server on $myServer");
$d = @mssql_select_db($myDB, $s)
or die("Couldn't open database $myDB");
?>
The page returns "Couldn't connect to MS SQL Server on localhost" each time I refresh the page. I've tried different logins & passwords, placed the server name in the $myServer variable instead of "localhost" but nothing seems to change the result.
I have a feeling that this has to do with the MS SQL Server 2000 set up / settings & not PHP. I am not a DBA, so I am not sure where to look for guidance.
Anyone have experience with using MS SQL Server 2000?