Hello all, first I want to say that I have been developing in PHP using MySql, but now I want to do it using Sql Server, so I have downloaded and installed Sql Server Express 2005.
I have read a lot about how should make a connection, but still I cannot make it work. I am using PHP 5.0.4 and Apache 1.3.3 on windows XP SP2.
This is what I have tried to do:
[PHP]
$myServer = "localhost,1031 ";
$myUser = "sa";
$myPass = "e********" ;
$myDB = "Northwind" ;
$s = @mssql_connect( $myServer, $myUser, $myPass)
or die("Unable to connect to SQL Server on $myServer");
[/PHP]
but it does not work, I always get the message about being Unable to connect to SQL Server on localhost,1031
The 1031 is the port that I have specified, I have made telnet localhost 1031 and it seems to work, but why is not my script working?
Thanks for any help
Martin
I have read a lot about how should make a connection, but still I cannot make it work. I am using PHP 5.0.4 and Apache 1.3.3 on windows XP SP2.
This is what I have tried to do:
[PHP]
$myServer = "localhost,1031 ";
$myUser = "sa";
$myPass = "e********" ;
$myDB = "Northwind" ;
$s = @mssql_connect( $myServer, $myUser, $myPass)
or die("Unable to connect to SQL Server on $myServer");
[/PHP]
but it does not work, I always get the message about being Unable to connect to SQL Server on localhost,1031
The 1031 is the port that I have specified, I have made telnet localhost 1031 and it seems to work, but why is not my script working?
Thanks for any help
Martin
Comment