Hello,
I use an Apache-Web-Server 1.3 with PHP 5 under Windows 2000. With a
PHP-script I want to get data from a MS-SQL-Server.
Therefore is within my php.ini:
extension=php_mssql.dll
Within my PHP-script the first relevant line is:
$conn=mssql_connect("mySqlServerName", "myUserID", "myPassword");
if (! $conn) Die("Error opening database: ".mssql_get_last_message());
I want to work with 2 SQL-servers.
With the first one (version unknown) the connection succeed and I can get
data.
With the other (MS-SQL-Server 2000) I get an error trying to connect to the
SQL-Server:
Warning: mssql_connect(): Unable to connect to server: mySqlServerName
The same script runs on another web-Server without any problem and can get
data from both SQL-Servers. I can also get data from both SQL-Server from
my machine using other tools (i.e. a Java-applikation). So the error must
be caused by PHP, ini-files, DLLs, ... on my machine.
With some tools I have recognized, that in case of a successful
MS-SQL-connection, the client (in my case the PHP-interpreter) opens a
socket connection on port 1433 to the SQL-server. In my case such a socket
connection is not opened.
Somebody has an idea, what I can do ?
Georg Gerber