Solved

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

Posted on 2009-05-11
6
1,640 Views
Last Modified: 2013-11-30
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.
<?php
// Server in the this format: <computer>\<instance name> or 
// <server>,<port> 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';
}
 
?>

Open in new window

0
Comment
Question by:jrmcintosh
6 Comments
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24354109
0
 

Author Comment

by:jrmcintosh
ID: 24354231
No, the mssql_connect function is not connecting to the database.
0
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24354256
well in that case, all I can guess is, either you are providing wrong credentials or you don't have proper permission to connect to database, as long as syntax and method concern, it is perfact, there is no problem in it. Only GoDaddy people can help you.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 7

Expert Comment

by:ycTIN
ID: 24354400
i'm using godaddy now, but my service is Linux server

godaddy provide quick install service godday connect, maybe you can try this
http://hostingmetropolis.com/Home.aspx
http://hostingmetropolis.com/Application/WordPress.aspx

if the application is work fine, you can reference they connection code
otherwise the problem in godday
0
 

Author Comment

by:jrmcintosh
ID: 24355527
What is the connection code?
0
 
LVL 19

Accepted Solution

by:
Michael701 earned 500 total points
ID: 24355757
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)
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question