PHP link LAN mssql problem [cause: not associated with trusted SQL Server connection]
Code
$hostname = "HTSC"; $dbuser = "sa"; $DBPASSWD = "123456"; $id = Mssql_connect ($hostname, $dbuser, $dbpasswd) or die ("Unable to connect to the database server! ");
If it is a local MSSQL database, the link is passed. However, if the link LAN within the other machine is not. The error message is:
Warning:mssql_connect () [Function.mssql-connect]: Message: User ' (null) ' Login failed. Cause: It is not associated with a trusted SQL Server connection. (Severity 14)
I've tried a lot of ways:
1. SQL Server and Windows in mixed mode
2, in addition to SA, also tried to add other users (with all permissions) to link
3. Telnet IP 1433 test passed
4, the database is sql2000 SP4
5, tried to change a few computers
6, with sql2000 Ntwdblib.dll covered the php5 file
In addition, I write in VB code is normal access to another MSSQL server.
Look at the user of MSSQL, there is a user of ASPNET, do you want to add a similar PHP user to log in?
Please help me.
------Solution--------------------
$hostname change to an IP address try
------Solution--------------------
is the landlord using PHP to connect to SQL SERVER?
Need to be configured php.ini, to be removed from the front of the Extension=php_mssql.dll
The default does not load any extension libraries
------Solution--------------------
------Solution--------------------
------Solution--------------------
It seems that I have had this problem before.
Do you directly use SQL Server's graphical interface to access other computers through this computer?
------Solution--------------------
Is it a firewall problem?
------Solution--------------------
Help the top again.