Zen Cart Logo
Forums / General Questions / There seems to be a problem connecting to our database

There seems to be a problem connecting to our database

Locked

Views: 12,526

Results 1 to 19 of 19
This thread is locked. New replies are disabled.
26 Mar 2008, 11:19 PM
#1
debbledee avatar

debbledee

New Zenner

Join Date:
Mar 2008
Posts:
3
Plugin Contributions:
0

There seems to be a problem connecting to our database

I have had alot of issues with my website, now when i try to go to the store i get the error.
Sorry!
There seems to be a problem connecting to our database. Please give us a few minutes to remedy the problem. Thank you.

Now i have read the forums and there may be a problem with my configure files. So i have pasted both files here. Can somebody please tell me if they see any issues with either one.

admin/includes/configure.php

// Define the webserver and path parameters
// Main webserver: eg, http://localhost - should not be empty for productive servers
// HTTP_SERVER is your Main webserver: eg, http://www.yourdomain.com
// HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com
// HTTP_CATALOG_SERVER is your Main webserver: eg, http://www.yourdomain.com
// HTTPS_CATALOG_SERVER is your Secure webserver: eg, https://www.yourdomain.com
/*

  • URLs for your site will be built via:
  • HTTP_SERVER plus DIR_WS_ADMIN or
    
  • HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or
    
  • HTTP_SERVER plus DIR_WS_CATALOG or
    
  • HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG
    
  • ...depending on your system configuration settings
    */
    define('HTTP_SERVER', 'http://leather2flesh.com.au');
    define('HTTPS_SERVER', 'https://leather2flesh.com.au');
    define('HTTP_CATALOG_SERVER', 'http://leather2flesh.com.au');
    define('HTTPS_CATALOG_SERVER', 'https://leather2flesh.com.au');

// Use secure webserver for catalog module and/or admin areas?
define('ENABLE_SSL_CATALOG', 'false');
define('ENABLE_SSL_ADMIN', 'false');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_ADMIN', '/store/admin/');
define('DIR_WS_CATALOG', '/store/');
define('DIR_WS_HTTPS_ADMIN', '/store/admin/');
define('DIR_WS_HTTPS_CATALOG', '/store/');

define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');
define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');
define('DIR_WS_INCLUDES', 'includes/');
define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
define('DIR_WS_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');

// * DIR_FS_* = Filesystem directories (local/physical)
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define('DIR_FS_ADMIN', '/home/mistress/public_html/store/admin/');
define('DIR_FS_CATALOG', '/home/mistress/public_html/store/');

define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');
define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', 'zen_');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'mistress_zc1');
define('DB_SERVER_PASSWORD', 'nRW71{2E19w{[');
define('DB_DATABASE', 'mistress_zc1');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage

// The next 2 "defines" are for SQL cache support.
// For SQL_CACHE_METHOD, you can select from: none, database, or file
// If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
// or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
// ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash
define('SQL_CACHE_METHOD', 'database');
define('DIR_FS_SQL_CACHE', '/home/mistress/public_html/store/cache');

includes/configure.php

// Define the webserver and path parameters
// HTTP_SERVER is your Main webserver: eg, http://www.yourdomain.com
// HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com
define('HTTP_SERVER', 'http://leather2flesh.com.au');
define('HTTPS_SERVER', 'https://leather2flesh.com.au');

// Use secure webserver for checkout procedure?
define('ENABLE_SSL', 'false');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_CATALOG', '/store/');
define('DIR_WS_HTTPS_CATALOG', '/store/');

define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_INCLUDES', 'includes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');

define('DIR_WS_PHPBB', '/');

// * DIR_FS_* = Filesystem directories (local/physical)
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define('DIR_FS_CATALOG', '/home/mistress/public_html/store/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');

// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', 'zen_');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'mistress_zc1');
define('DB_SERVER_PASSWORD', 'nRW71{2E19w{[');
define('DB_DATABASE', 'mistress_zc1');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage

// The next 2 "defines" are for SQL cache support.
// For SQL_CACHE_METHOD, you can select from: none, database, or file
// If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
// or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
// ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash
define('SQL_CACHE_METHOD', 'database');
define('DIR_FS_SQL_CACHE', '/home/mistress/public_html/store/cache');

Also when i try to log into my store admin i get the following error. Can someone please help me and save me.

0 DB_ERROR_NOT_CONNECTED
in:
[db_cache table]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

4 Apr 2008, 9:50 AM
#2
jaskarn avatar

jaskarn

New Zenner

Join Date:
Nov 2007
Location:
Auckland, New Zealand
Posts:
59
Plugin Contributions:
0

Re: There seems to be a problem connecting to our database

are you sure your password is correct.
It is probably because you have not added yourself as a user to your database. Go to cPanel, then MySQL Database, and there should be a section which says "Add Users" where you can select your user name from a drop down list and then your databse from a dropdown list. Once you have assigned your username to your databse it should work. If it still does not work then try using a simpler password. Im not sure but the brackets and slashs could be confusing it. tell me if you succed. :smile:

4 Apr 2008, 2:51 PM
#3
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: There seems to be a problem connecting to our database

Not sure if this is a new problem or if you've had it since day one.

First, I would change your db password:
define('DB_SERVER_PASSWORD', 'nRW71{2E19w{[');

Get rid of the special characters for now.

If you still get the error msg. "There seems to be a problem connecting to our database. Please give us a few minutes to remedy the problem.", then contact your Hoster. Problem could be on their end.

9 Apr 2008, 3:12 PM
#4
agentj avatar

agentj

New Zenner

Join Date:
Apr 2008
Posts:
2
Plugin Contributions:
0

Re: There seems to be a problem connecting to our database

Hi, Did you problem get resolved? I'm having the same problem, I cannot even access my https://www.domain.com/admin panel! Did you get yours fixed and if so, how?

10 Apr 2008, 12:51 PM
#5
paula avatar

paula

New Zenner

Join Date:
Jan 2008
Posts:
13
Plugin Contributions:
0

Re: There seems to be a problem connecting to our database

I am getting this same message:

Sorry!
There seems to be a problem connecting to our database. Please give us a few minutes to remedy the problem. Thank you.

Help!!

9 Sep 2008, 9:45 PM
#6
crisand avatar

crisand

New Zenner

Join Date:
Feb 2008
Posts:
39
Plugin Contributions:
0

Re: There seems to be a problem connecting to our database

Help!!
My site has been up and running for months and has been fine, and then this morning the site is down with the message there seems to be a problem connecting to our database, and when I do to my admin I get the answer '0 DB_ERROR_NOT_CONNECTED
in:
[db_cache table]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

Help, help, what can I do to fix this!

9 Sep 2008, 11:54 PM
#7
berryb avatar

berryb

New Zenner

Join Date:
Sep 2008
Posts:
7
Plugin Contributions:
0

Re: There seems to be a problem connecting to our database

Yea, I need to second (third) this! I've been getting this on and off for a few weeks. I check the forums each time... I've triple checked my configure.php. My hosting provider is MediaTemple and I'm running an SQL container. Media temple is very reliable and since I'm seeing this same thing through out the forum it seems like it could easily be a ZEN cart thing.

Today its only the ADMIN. And actually as I finish this post, it is now working. It only goes down for a bout 5 minutes at a time. We're not live yet, but it sure is tough when trying to show the client, but I get the following when working with the ADMIN:

0 DB_ERROR_NOT_CONNECTED
in:
[select * from project_version WHERE project_version_key = 'Zen-Cart Database' ]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

10 Sep 2008, 1:05 AM
#8
berryb avatar

berryb

New Zenner

Join Date:
Sep 2008
Posts:
7
Plugin Contributions:
0

Re: There seems to be a problem connecting to our database

OH... and this might be helpful: I'm using SSL and sometimes when I add the 's' to the http://...etc... the site comes back. But this is not always the case. Also, I thought when SSL is enabled the site runs exclusively on https// - for example the home logo points to http even thought I may be on an https page.

???

10 Sep 2008, 2:05 AM
#9
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: There seems to be a problem connecting to our database

SSL links are used when needed, not all the time. And the database problems are probably Hoster related. After all, if your site is working fine and you don't change anything but then start having problems database connecting, it only makes sense the problem is on the Hosting end.

10 Sep 2008, 2:18 AM
#10
berryb avatar

berryb

New Zenner

Join Date:
Sep 2008
Posts:
7
Plugin Contributions:
0

Re: There seems to be a problem connecting to our database

Thanks for the reply. I've got a support ticket out to my provider... I'll keep the thread up to date on what I find.

Thing is... I keep seeing this problem pop up. The intermittent thing, I mean. What do you think could be the issue on the hosting end?

10 Sep 2008, 4:44 AM
#11
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: There seems to be a problem connecting to our database

Most common problem is the Server being overloaded.

This can be due to many things and comes down to Server maintainence. Be it too many accounts on the Server or a runaway script or something else, Servers, like Web sites, need to be maintained on a regular basis else things will go wrong.

10 Sep 2008, 11:01 PM
#12
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: There seems to be a problem connecting to our database

Have any of your database tables become corrupted? You might need to do a repair on all the tables. Ask your hosting company for the best way to do this ... some offer a one-click repair-all button in their control panel. Otherwise you'll have to do it manually table-by-table via phpMyAdmin.

11 Sep 2008, 2:25 AM
#13
berryb avatar

berryb

New Zenner

Join Date:
Sep 2008
Posts:
7
Plugin Contributions:
0

Re: There seems to be a problem connecting to our database

I've done a repair database, but nothing on individual tables. I'll have to look in to that.

My host is looking in to it also.

21 Nov 2008, 12:29 AM
#14
jahfree avatar

jahfree

New Zenner

Join Date:
Jul 2007
Posts:
2
Plugin Contributions:
0

Re: There seems to be a problem connecting to our database

I MAY HAVE A FIX: I have the some ERROR in accessing my Storefront DB.

I recently changed my passwords on my server (Admin, and all others) -- THEN i noticed this error.

SO, I went into the includes/configure.php and changed the admin password to the new one.

NOTE: After you edit the file, you will have to do a CHMOD 444 Configure.php to reset the file to READ ONLY.

It may very well be that your HOSTING admin changed username and/or password to the SQL program they use - CALL EM UP!

Otherwise, perhaps the admin changed one of the other variables below:
(THIS CODE IS AT THE BOTTOM OF THE CONFIGURE.PHP FILE)

// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', 'zen_');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'mistress_zc1');
define('DB_SERVER_PASSWORD', '*****');
define('DB_DATABASE', 'mistress_zc1');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage

Please let me know if this worked for you.

21 Nov 2008, 12:49 AM
#15
jahfree avatar

jahfree

New Zenner

Join Date:
Jul 2007
Posts:
2
Plugin Contributions:
0

Re: There seems to be a problem connecting to our database

In addition to the main storefront/includes/configure.php file., dont forget to modify the username & password in the Admin/includes/configure.php file. This give you access to your Admin Page.

Then you will have reset the file access permissions using CHMOD 444 configure.php.

I hope this helps!

Please let me know.

21 Nov 2008, 3:41 AM
#16
berryb avatar

berryb

New Zenner

Join Date:
Sep 2008
Posts:
7
Plugin Contributions:
0

Re: There seems to be a problem connecting to our database

Wow. I'll be excited to try this. Unfortunately our client has gone AWAL. We have our deposit and the site is done, but he's not paying up. We've stopped work until this is resolved.

I'll make sure to post my findings when we restart. Thanks for the reply!

25 Mar 2009, 9:40 PM
#17
bobthebuilder avatar

bobthebuilder

New Zenner

Join Date:
Mar 2009
Location:
Colorado Springs, CO
Posts:
4
Plugin Contributions:
1

Re: There seems to be a problem connecting to our database

I ran into this same problem. It turned out to be caused by the fact that I had a PHPbb forum database linked to my zen-cart. When I changed the admin password for MySql databases I changed them in include/configure.php and admin/include/configure.php but somehow neglected to also change the password in ~/phpbb2/config.php :oops:

8 Sep 2010, 11:27 PM
#18
bigblue avatar

bigblue

New Zenner

Join Date:
Oct 2009
Posts:
29
Plugin Contributions:
0

Re: There seems to be a problem connecting to our database

I am currently running into similar issue. I can get into the admin section jsut fine but the store front gives me the

"Sorry!
There seems to be a problem connecting to our database. Please give us a few minutes to remedy the problem. Thank you."

Gone back thru both my config files and I cant find any differences, so not sure what causes the one issue and not the other.

http://216.14.122.101/~cophfab/store

I have the whole site on my local drive and everything works fine. Its just the online version I am getting the error.

9 Sep 2010, 2:40 AM
#19
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: There seems to be a problem connecting to our database

Evidently the database credentials in your configure.php files are incorrect for the server you've put it on. The DB_SERVER, DB_DATABASE, DB_USERNAME, DB_PASSWORD, and DB_PREFIX all need to be correct for the specific server on which you've got the site. It's different from what you'd have on your "local drive".

That message appears when the software uses the details in the file and attempts to connect to the database but is denied.

Remember: the configure.php files are normally read-only so any edits you attempt can only be saved/uploaded if you first make the file writable.