Zen Cart Logo
Forums / Basic Configuration / Cannot connect to database, and is causing whole site to not display!

Cannot connect to database, and is causing whole site to not display!

Locked

Views: 1,101

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
28 Apr 2010, 8:58 PM
#1
anewman880 avatar

anewman880

New Zenner

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

Cannot connect to database, and is causing whole site to not display!

I am redoing a website for a jewelry business, and the original designer used zen cart. I do not know the version. I am here to build a new CMS from scratch and use it instead of Zen, so it can be geared more towards jewelry.

I have no idea how to use Zen cart or what the previous designer set the preferences and username and password to, but I tried to upload phpmyadmin to my godaddy server, and I got an error message saying Zen could not connect to the database. When you pull up our site, it's all you see. I can't even log into the admin without getting this message! We need our site for business. Help! :blink:

http://www.meridiandiamond.com

28 Apr 2010, 9:17 PM
#2
tinas avatar

tinas

Totally Zenned

Join Date:
Jan 2005
Location:
Lake Havasu, AZ
Posts:
1,090
Plugin Contributions:
0

Re: Cannot connect to database, and is causing whole site to not display!

Usually this means that you have the settings in the 2 configure files wrong - the database settings are inaccurate.

Check in admin/includes/configure.php and /includes/configure.php and see what is wrong in the database settings.

1 May 2010, 2:52 PM
#3
anewman880 avatar

anewman880

New Zenner

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

Re: Cannot connect to database, and is causing whole site to not display!

so what do I do then? I have no idea about how ZenCart works, or which databases are supposed to connect to which, or the username or the password for the databases. I found the configuration file in the admin directory, but what's it supposed to look like?

here's the message I get when I log into admin:

0 DB_ERROR_NOT_CONNECTED
in:
[select * from zen_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.

And here's my config file in my includes directory:

define('HTTP_SERVER', 'http://meridiandiamond.com');
define('HTTPS_SERVER', 'https://meridiandiamond.com');

// 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', '/');
define('DIR_WS_HTTPS_CATALOG', '/');

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/content/m/e/r/meridain/html/');

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', 'mer0732408295748');
define('DB_SERVER_PASSWORD', '*******');
define('DB_DATABASE', 'mer0732408295748');
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', '');
define('DIR_FS_SQL_CACHE', '');

?>

1 May 2010, 3:58 PM
#4
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Cannot connect to database, and is causing whole site to not display!

There are two (different) configure.php files - one in admin/includes, and one in /includes. Looks like you need to change the db login or name in the admin one. Your store is working.