PHP连接本机MS SQL2000成功,但连接其它计算机的SQL SERVER出现错误:
Warning: mssql_connect() [function.mssql-connect]: message: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. (severity 14) in C:\AppServ\www\sql.php on line 10Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: ysdg-five in C:\AppServ\www\sql.php on line 10

解决方案 »

  1.   

    远程SQL Server使用的是哪种身份验证模式?
    是windows,还是混合验证模式!
      

  2.   

    混合验证模式
    <?
    $link=mssql_connect("ysdg-five","sa","525321");
    mssql_select_db("kqdata");
    $sqlstr="select top 10 * from personal";
    $result=mssql_query($sqlstr,$link);
    $row=mssql_num_rows($result);
    echo $row;
    mssql_free_result($result);
    mssql_close($link);
    ?>
      

  3.   

    $link=mssql_connect("ysdg-five","sa","525321");會出錯
      

  4.   

    什么错误?
    php版本?php5之前可以用mssql,之后可以选择PDO
      

  5.   

    Warning: mssql_connect() [function.mssql-connect]: message: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.我的PHP 5.2.1版,依錯誤提示 Login failed for user '(null)',是否是用戶權限問題?改如何設置呢,我的兩台電腦都加入了本廠CN域,但都開了Domain admin權限。
      

  6.   

    php.ini 中 mssql.secure_connection 怎么设置的
      

  7.   

    經過測試還是存在以下錯誤:
    Warning: mssql_connect() [function.mssql-connect]: message: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: ysdg-five in C:\AppServ\www\sql.php on line ..
      

  8.   

    用 Sql Server 客户端工具能连上远程的吗
      

  9.   

    http://www.sugarcrm.com/forums/archive/index.php/t-14915.html
      

  10.   

    这里有答案:http://support.microsoft.com/kb/827422/zh-cn
      

  11.   

    编程动力 www.bcexe.com 专业的编程开发类网站,网络编程,软件开发,网站开发,一切尽在这里!
      

  12.   

    你确定两台机器的防火墙设置正确吗?如果你用客户端工具能连上 ysdg-five ,那说明两台机器设置应该没问题,只是PHP的问题了你用PHP在本地连接都没问题,那么PHP也没问题那么PHP的远程连接有问题吗(被防火墙挡了)?显然不是,因为有提示:Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection
    所以,请你再次确认,你用客户端工具能连上 ysdg-five 吗?