Solved

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

Posted on 2009-05-11
6
1,628 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
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.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…

773 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