dpjjr42626 2011-05-28 06:15
浏览 148
已采纳

php mssql_connect无法正常工作

Here's the code that I am using.

<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);

$myServer = "ip-address:1334/SQLEXPRESS";
$myUser = "username";
$myPass = "password";
$myDB = "dbname";

$link = mssql_connect($myServer, $myUser, $myPass);
if ( !$link ) {
  if ( function_exists('error_get_last') ) {
     var_dump(error_get_last());
           }
  die('connection failed');
   }
  ?>

Now this code is running on a linux machine and the server is on a windows server. The IP is correct as well as username, password I created a new pair inside SQLEXPRESS. However, I still get a connection issue.

 Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server

the port 1334 is opened by our windows server and SQL server is listening to both 1334 and 1433. THey wont open default port for security reasons. They have double checked the settings but I still cannot connect.

What should be the next action for me.

Kind regards

Khuram

  • 写回答

3条回答 默认 最新

  • donglan9517 2011-05-28 06:26
    关注

    May be the windows SQL server have a firewall restriction which is restricting to access from outside of the server.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥100 关于使用MATLAB中copularnd函数的问题
  • ¥20 在虚拟机的pycharm上
  • ¥15 jupyterthemes 设置完毕后没有效果
  • ¥15 matlab图像高斯低通滤波
  • ¥15 针对曲面部件的制孔路径规划,大家有什么思路吗
  • ¥15 钢筋实图交点识别,机器视觉代码
  • ¥15 如何在Linux系统中,但是在window系统上idea里面可以正常运行?(相关搜索:jar包)
  • ¥50 400g qsfp 光模块iphy方案
  • ¥15 两块ADC0804用proteus仿真时,出现异常
  • ¥15 关于风控系统,如何去选择