php - Connect to remote mssql with public ip -
i cannot connect remote mssql using
mssql_connect(xx.xx.xx.xx\instancename, $user, $password);
i tried:
- xx.xx.xx.xx\instancename,1433 - xx.xx.xx.xx\instancename,1434 - xx.xx.xx.xx\instancename - xx.xx.xx.xx:1434 - xx.xx.xx.xx:1433 - xx.xx.xx.xx
none of them work. however, when tried connect database sql management studio public ip, works(xx.xx.xx.xx
or xx.xx.xx.xx\instancename, 1433
) don't think there problems ports. works when created local mssql database , connect php using local ip, doesn't work when tried connect remote mssql(different network) using wan ip. know cause or how connect remote mssql php? thank you
i fixed problem using sqlsrv driver microsoft
$dbh = new pdo ("sqlsrv:server=xx.xx.xx.xx,1433;database=xxxx",'user','password');
:)
Comments
Post a Comment