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

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -