Troubleshooting MSSQL Connection from PHP
- by Cory Dee
I'm trying to connect to an external Sql Server through PHP 5.2.
Using this line:
$con = mssql_connect('123.123.123.123','Username','Password') or die('Could not connect to the server!');
I'm receiving this error:
Warning: mssql_connect() [function.mssql-connect]: Unable to connect
to server: 123.123.123.123 in
/home/file/public_html/structure/index.php on line 4 Could not connect
to the server!
My hosting provider assures me that ports are open for my server to connect to the DB. Looking at my php info, MSSQL Support is enabled, using FreeTDS.
Any ideas why this would be failing, or how I can begin trouble shooting the problem?