note 43459 added to function.mssql-connect
| From: | vg_c at mail dot ru | Date: | Tue, 22 Jun 2004 07:15:27 +0000 |
| Subject: | note 43459 added to function.mssql-connect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-71484@lists.php.net to get a copy of this message | ||
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");
?>
----
Manual Page -- http://www.php.net/manual/en/function.mssql-connect.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+43459
Delete -- http://master.php.net/manage/user-notes.php?action=delete+43459&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+43459&report=yes
Search -- http://master.php.net/manage/user-notes.php