$link = Mssql_connect ($ip, ' user ', ' password ');
if ($link) {
echo ' yes ';
}else{
Echo ' no ';
}
Output ' no '
I am using Mssql_connect to connect to the remote server. Configuration has been set. Includes the Php.ini.ntwdblib.dll file, and the server allows remote connections. Still not connected yet?
Is there any reason why that person knows?
Reply to discussion (solution)
Http://zhidao.baidu.com/question/276311226.html you look at this link and I want to help you.
I've seen it. Baidu has searched this aspect of the problem. •
Or thank you, huh?
$link = Mssql_connect ($ip, ' user ', ' password ');
if ($link) {
echo ' yes ';
}else{
Echo ' no ';
}
Output ' no '
I am using Mssql_connect to connect to the remote server. Configuration has been set. Includes the Php.ini.ntwdblib.dll file, and the server allows ...
I have encountered this kind of problem, found the relevant package on the foreign website, now share him out, if there is a problem, can contact
http://download.csdn.net/detail/sosqrn975/5169189
Landlord use Mssql_connect to connect without reporting grammatical error, obviously not a configuration problem
For the landlord did not give the error message (should echo mssql_get_last_message (), rather than echo ' no ';)
Just guessing.
Confirm that firewall 1433 is turned on
Verify that the user name and password are correct
Confirm that there is only one instance of the target server (otherwise add the instance name to the destination address)
PHP Connection MSSQL Database method, you can refer to the next.
It's a little more than that.
Echo Mysql_error (). "
";
Compare less use!!!
When you install MySQL, you need to choose to allow remote connections
Then I figured it out for myself. Summary of the detailed comprehensive web search
1. First configure the php.ini as usual practice
2. Download the correct version of Ntwdblib.dll (2000.80.194.0), note this version number, if it is 2000.2.8.0 is old. Not supported
3. Ntwdblib.dll Copy to C:\WINDOWS\system32
4. Run SQL Server Configuration Manager: SQL Server Config Manager, open protocol protocols
5. Allow Named pipes "Named Pipes" and "TCP/IP",
6. Restart SQL Server, Apache, and PHP
Connect MS SQL Server 2005 using the following methods:
Mssql_connect (' localhost,1433 ', USERNAME, PASSWORD);
And the version must be correct