Virtual machine Environment SQLSERVR2003 installed APPSERV Package
SQL2000 database that can connect to this machine
The SQL2000 database of the public network is unreachable (can be connected with ASP.)
Excuse me, what is the reason?
Reply to discussion (solution)
With ASP. NET can be connected, with PHP not connected, obviously the code or the connection word is wrong
Of course, it does not rule out the problem of environment configuration when not on the same machine
Then why the SQL2000 connected to the machine is no problem?
Environment configuration? This database is placed in the public network of space, should be popular
Use ASP. NET to connect to public network database from native computer
Use ADODB can only connect the SQL2000 of the machine to the remote SQL2000 error:
Warning:mssql_pconnect () [Function.mssql-pconnect]: Message: User ' (null) ' Login failed. Cause: It is not associated with a trusted SQL Server connection. (severity) in C:\AppServ\www\test\adodb\drivers\adodb-mssql.inc.php on line 625
The error message is not to tell you: you did not give the user name?
That's where the hell is. Ming is a user name! This user can log in to SQL normally
Code:
Include (' adodb\adodb.inc.php ');
$conn = &newadoconnection (' mssql ');
$conn->pconnect (' Remote IP ', ' db_xxx ', ' XXX ', ' test ');
$conn->debug = true;
$ADODB _fetch_mode = Adodb_fetch_both;
Pconnect ($host = "", $username = "", $password = "", $database = "")
$host = "201.111.21.132";
$username = "Db_test";
$password = "Testpwd";
$database = "Test";
$conn->pconnect ($host, $username, $password, $database);
This is still not good, the same mistake
Switch to the local IP on OK
Thanks for the reply from upstairs!
Search for the next related posts! Here's how to fix it:
Open php.ini
Put mssql.secure_connection = On
Modified to Mssql.secure_connection = Off
You can connect to the remote SQL2000 database.