Troubleshooting MSSQL Connection from PHP
        Posted  
        
            by 
                Cory Dee
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Cory Dee
        
        
        
        Published on 2012-10-07T15:17:22Z
        Indexed on 
            2012/10/07
            15:37 UTC
        
        
        Read the original article
        Hit count: 334
        
php
|sql-server
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?
© Stack Overflow or respective owner