Question : Need help, go daddy host can't connect to MS SQL DB with php

I am very frustrated right now with go daddy and their services. I spent last week upgrading to IIS 7 and removing and restoring databases, so that I can use ms sql extensions in php.

I'm trying to create a very simple script that merely connects to the database server that I have, but all I'm getting is it saying that it can't connect to the server.

I know this information is correct because it's the same information that I use for a .NET connection string and it works just fine.

Does anyone have any suggestions? I'm desperate.
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
\ or 
// , when using a non default port number
error_reporting(E_ALL);
 
if (!function_exists('mssql_connect')) {
  echo 'mssql_connect not exist';
  exit;  
}
 
$server = 'ggcircuit.db.3438312.hostedresource.com';
 
$link = mssql_connect($server, 'ggcircuit', 'xxxxxx');
 
if(!$link)
{
    die('Something went wrong while connecting to MSSQL');
} else {
  echo 'aaaaaaaaaa';
}
 
?>

Answer : Need help, go daddy host can't connect to MS SQL DB with php

Ok I hate GoDaddy for this cause they have a zillion links on every page and it's hard to explain to someone where to click. But here goes.

Signin to GoDaddy.
Click 'hosting' lefthand menu area
Click 'manage' for the domain of the database
Under Action column click the pencil 'Edit / View'
Then click the 'Configuration' button.

This will display your php connect code. You have to correct the password.

(your server string looks a little odd, not that it's not correct, but this will verify)
Random Solutions  
 
programming4us programming4us