I have a Windows 2000 Server (SP2) with IIS, PHP, and Microsoft SQL Server.
A php script was done display some stats, he uses a smaller script to connect to the database.
Something like this:
<?
$op=mssql_connect('@ IP of the server ','user','password');
mssql_select_db("name of the db",$op);
If I run the script to display the stats, I get the message
Warning: MS SQL: Unable to connect to server: '@ IP of the server ' in 'path where is located the small script' on line 2
(that is, the line that opens the connection - mssqlconnect...)
Plus other errors, coming from the fact that I'm not able to connect to the database.
I tried to run the same script from my own computer, creating a little Apache server.
I just get the same files without modifying them.
And, surprise, It worked.
It may has something to do with IIS or maybe the fact that my computer isn't in the same sub-network of the server.
I really don't know.
Can someone help me, please ?
Thanks.
Michael.