note 43459 rejected from function.mssql-connect by betz

From: Date: Tue, 22 Jun 2004 07:56:46 +0000
Subject: note 43459 rejected from function.mssql-connect by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-71487@lists.php.net to get a copy of this message
Note Submitter: vg_c@mail.ru ---- I had problems connecting to an SQL 2000 database on Windows XP. I got an error message saying : Warning: mssql_connect(): Unable to connect to server: localhost in z:\home\localhost\www\test.php on line 6 Here is a connection script: <?php $myServer = "localhost"; $myUser = "sa"; $myPass = "password"; $myDB = "forSite"; $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"); ?>

« previous php.notes (#71487) next »