Zen Cart Logo
Forums / Installing on a Linux/Unix Server / Keep getting "Problem connecting to our database"

Keep getting "Problem connecting to our database"

Views: 1,750

Results 1 to 19 of 19
5 Nov 2012, 4:01 AM
#1
dcporter avatar

dcporter

New Zenner

Join Date:
Oct 2012
Posts:
19
Plugin Contributions:
0

Keep getting "Problem connecting to our database"

http://www.zen-cart.com/images/smilies/wacko.gif I've read every post on the forum about this type of problem & nothing seems to fix mine. I've checked my cPanel database setup and my database name, password, spellings are all correct. Went to my /Includes/configure.php file and my database references are all the same as in the MySQL databases in my cPanel. Any clues as to what's wrong & what I can do to fix this?

5 Nov 2012, 5:02 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Keep getting "Problem connecting to our database"

Who are you hosted with?
Do your configure.php files list "localhost" as the server?
What have you done with this install??
Fresh install?
Upgrade install?
Manual install?
Or one click install?

5 Nov 2012, 5:17 AM
#3
dcporter avatar

dcporter

New Zenner

Join Date:
Oct 2012
Posts:
19
Plugin Contributions:
0

Re: Keep getting "Problem connecting to our database"

kobra:

Who are you hosted with?
Do your configure.php files list "localhost" as the server?
What have you done with this install??
Fresh install?
Upgrade install?
Manual install?
Or one click install?

I host with Blue Host.
My configure.php does list "localhost" as the server.
This is a fresh, manual install, that I did myself.

5 Nov 2012, 5:22 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Keep getting "Problem connecting to our database"

Does it load intermittently or just not at all??

5 Nov 2012, 5:58 AM
#5
dcporter avatar

dcporter

New Zenner

Join Date:
Oct 2012
Posts:
19
Plugin Contributions:
0

Re: Keep getting "Problem connecting to our database"

It does not load at all.

5 Nov 2012, 6:00 AM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Keep getting "Problem connecting to our database"

It does not load at all.
But not at all....
Are you getting the "Problem connecting to our database" message??

5 Nov 2012, 6:11 AM
#7
dcporter avatar

dcporter

New Zenner

Join Date:
Oct 2012
Posts:
19
Plugin Contributions:
0

Re: Keep getting "Problem connecting to our database"

When I click Online Catalog in my admin panel the store doesn't load. What comes up is an error page that says "Problem connecting to our database"

5 Nov 2012, 6:13 AM
#8
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Keep getting "Problem connecting to our database"

Does your storefront load normally?
Does your admin load?(I am guessing so as you are clicking "Online Catalog")

5 Nov 2012, 6:36 AM
#9
dcporter avatar

dcporter

New Zenner

Join Date:
Oct 2012
Posts:
19
Plugin Contributions:
0

Re: Keep getting "Problem connecting to our database"

Admin loads perfectly. Everything in it works fine except for when I click on "Online Catalog"
Attachment 11386

5 Nov 2012, 6:37 AM
#10
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Keep getting "Problem connecting to our database"

Everything in it works fine except for when I click on "Online Catalog"
Well then don't do that
Open a tab with your storefront and another tab with your admin

5 Nov 2012, 6:41 AM
#11
dcporter avatar

dcporter

New Zenner

Join Date:
Oct 2012
Posts:
19
Plugin Contributions:
0

Re: Keep getting "Problem connecting to our database"

I'll do that.
But what's the purpose of the "Online Catalog" if it doesn't work?

5 Nov 2012, 12:16 PM
#12
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Keep getting "Problem connecting to our database"

what's the purpose of the "Online Catalog" if it doesn't work?
Well, normally it does work

5 Nov 2012, 12:29 PM
#13
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Keep getting "Problem connecting to our database"

dcporter:

Any clues as to what's wrong & what I can do to fix this?

There are two configure.php files (one under /includes/ the other in /renamedAdmin/includes.

Do these both have** identical **settings for the database?

When you hover your mouse over the "Online Catalog" what is the URL displayed by the browser?

Cheers
Rod

5 Nov 2012, 6:18 PM
#14
dcporter avatar

dcporter

New Zenner

Join Date:
Oct 2012
Posts:
19
Plugin Contributions:
0

Re: Keep getting "Problem connecting to our database"

The /includes/configure.php file is smaller than the /renamedAdmin/includes files. But they both have the exact database information.
When I mouse of "Online Catalog" it shows the following URL: http://www.(mysite.com/(renamed cart folder)/index.php?main_page=

6 Nov 2012, 7:39 AM
#15
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Keep getting "Problem connecting to our database"

dcporter:

When I mouse of "Online Catalog" it shows the following URL: http://www.(mysite.com/(renamed cart folder)/index.php?main_page=

This could be a clue. Please explain what I've highlighted in red. I'm a little confused because there isn't (or shouldn't be) a 'renamed cart folder'.
There is/should be a 'renamed admin folder', and if this is what you meant, then this is the problem.. That link is supposed to go to the store folder and NOT the renamed 'admin' folder.

If you really did mean 'renamed cart folder', then that is probably wrong too, because as stated, there is no such folder. The problem I have with this one is is this were wrong you'd be getting a page not found error rather than a database connection error.

Perhaps If I rephrase the question.

You have previously stated that you can go to the store front ok by entering the store URL into your browser. My question is, in what way does the URL differ when you hover over the link? It has to be different than what you type into the browser, else you'd get the same results either way. It is this difference that is the key to your problem.

Cheers
Rod

6 Nov 2012, 8:05 AM
#16
dcporter avatar

dcporter

New Zenner

Join Date:
Oct 2012
Posts:
19
Plugin Contributions:
0

Re: Keep getting "Problem connecting to our database"

RodG:

This could be a clue. Please explain what I've highlighted in red. I'm a little confused because there isn't (or shouldn't be) a 'renamed cart folder'.
There is/should be a 'renamed admin folder', and if this is what you meant, then this is the problem.. That link is supposed to go to the store folder and NOT the renamed 'admin' folder.

If you really did mean 'renamed cart folder', then that is probably wrong too, because as stated, there is no such folder. The problem I have with this one is is this were wrong you'd be getting a page not found error rather than a database connection error.

Perhaps If I rephrase the question.

You have previously stated that you can go to the store front ok by entering the store URL into your browser. My question is, in what way does the URL differ when you hover over the link? It has to be different than what you type into the browser, else you'd get the same results either way. It is this difference that is the key to your problem.

Cheers
Rod

I placed my Zen Cart files into a sub folder of my main site. Examples of the two sub folders to my Zen Cart are:
/public_html/(my main site folder)/(Zen Cart folder)/includes
/public_html/(my main site folder)/(Zen Cart folder)/store

I set the site up a couple of weeks ago, then had to leave it, without finishing.
When I came back to finish it I could not access the temporary (or demo) cart site.
I tried to access it through admin by clicking on "Online Catalog" but the page that came up said there was a database error.

What I thought was a direct link to my Cart site did not work. So I'm simply trying to figure out how to access my site.
Hope that clears it some.

6 Nov 2012, 8:41 AM
#17
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Keep getting "Problem connecting to our database"

I don't know how you manage, but I'm getting more confused with each response you give.

dcporter:

I placed my Zen Cart files into a sub folder of my main site. Examples of the two sub folders to my Zen Cart are:
/public_html/(my main site folder)/(Zen Cart folder)/includes
/public_html/(my main site folder)/(Zen Cart folder)/store

Firstly, 'public_html' is the 'main site folder' for almost every server on the internet, ergo, I can only guess what you are considering to be the 'main site folder'.
Secondly, regardless of what or where the 'main site folder' is, a typical ZenCart installation will NOT have an /includes folder and a /store folder inside of it. If it does, I've no idea how you got it there.

This may make a bit more sense if you use actual file/folder names rather than (my main site folder)/(Zen Cart folder)/

Also be aware a location that contains 'public_html' is NOT a URL (website address). It is a FILE LOCATION. Do NOT confuse the two.

dcporter:

I set the site up a couple of weeks ago, then had to leave it, without finishing.

Hmm, brand new site. Never worked properly since installing. Confusing and/or non existent folders being referenced. Internal links going to invalid pages.

In my opinion, scrap this installation and start again... it's probably going to be a heck of a lot quicker than the approach currently taken.

dcporter:

When I came back to finish it I could not access the temporary (or demo) cart site.

Again, more confusion. What is this temporary/demo site that hasn't been mentioned until now? How does this relate the current site (which I assume is not the demo site)?

dcporter:

I tried to access it through admin by clicking on "Online Catalog" but the page that came up said there was a database error.

I have asked you about this on two occasions now. I even rephrased it the second time around to help clarify things. I am still awaiting a response.

dcporter:

What I thought was a direct link to my Cart site did not work.

Yes, we have already established that this is one of your issues, which then led to: My question is, in what way does the URL differ when you hover over the link?

dcporter:

So I'm simply trying to figure out how to access my site.

I'm simply trying to get some definitive responses so that I can build up a mental picture of what is going on that could possible cause your problem(s).

I'm not really getting the responses I need, and those I am getting seem to muddy the waters even further.

dcporter:

Hope that clears it some.

I wish it did, but we have now gone from trying to solve one mystery "When I click Online Catalog in my admin panel the store doesn't load. What comes up is an error page that says Problem connecting to our database" (Which in itself should be quite easy to debug) to the situation whereby I'm no longer sure that anything about your installation is actually 'correct' for a typical 1st time zencart installation.

eg:
/public_html/(my main site folder)/(Zen Cart folder)/store - Not normal/typical (although not necessarily wrong).
http://www.(mysite.com/(renamed cart folder)/ - Not normal/typical. The admin folder is to be renamed, not the cart folder.

If either of these were wrong I'd expect a lot more serious issues than the one you are describing. Why isn't that the case?

I really don't know where to go from here, other than as suggested, a fresh install....

Cheers
rod

6 Nov 2012, 8:06 PM
#18
dcporter avatar

dcporter

New Zenner

Join Date:
Oct 2012
Posts:
19
Plugin Contributions:
0

Re: Keep getting "Problem connecting to our database"

Rod,

You've torn me to pieces. I never thought it would be this complicated. I won't look for any additional help. I'll just start over.

Thanks anyway.

7 Nov 2012, 7:03 AM
#19
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Keep getting "Problem connecting to our database"

dcporter:

I never thought it would be this complicated. .

The thing is, it shouldn't be this complicated, but somehow, somewhere, something has gone amiss, and the more I look the more things appear to be amiss.

This isn't a criticism against you in any way... sometimes these things just happen. If we look long and dig deep enough there is sure to be some sort of logical explanation, but quite often it really isn't worth the effort when it's easier to simply start afresh.

Now if you get the exact same problems with a fresh install that's a whole new ballgame.
If this were an existing store with hundreds or products and customers it will probably be worth spending a little (lot) more time with it, but since this doesn't appear to be the case it's best to treat it as a training exercise that didn't go as planned, so pull up your boots and try again.

You may think that this experience has been a big waste of time, but it really hasn't, the experience itself is actually priceless :)

Cheers
Rod