Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2010
    Posts
    2
    Plugin Contributions
    0

    Default 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!

    http://www.meridiandiamond.com

  2. #2
    Join Date
    Jan 2005
    Location
    Lake Havasu, AZ
    Posts
    1,149
    Plugin Contributions
    0

    Default 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.
    When the world gets in my face I say Have A Nice Day.
    * I DO Think and I HAVE BEEN Zenned - therefore, I AM * I donate - do you?
    Custom Templates and Zen Services CRS Designs, Inc.

  3. #3
    Join Date
    Apr 2010
    Posts
    2
    Plugin Contributions
    0

    Default 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', '');

    ?>

  4. #4
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,024
    Plugin Contributions
    3

    Default 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.

 

 

Similar Threads

  1. v138a Cannot connect to database
    By blueroomhermit in forum General Questions
    Replies: 10
    Last Post: 17 Nov 2013, 03:43 AM
  2. Cannot connect to database
    By pontiacg5 in forum Installing on a Linux/Unix Server
    Replies: 5
    Last Post: 12 Jul 2010, 03:00 PM
  3. Cannot get the site to connect to database
    By ctcentralinfo in forum General Questions
    Replies: 18
    Last Post: 17 Aug 2007, 06:48 PM
  4. Cannot Connect To Database...
    By kbalona in forum General Questions
    Replies: 2
    Last Post: 3 May 2007, 07:41 PM
  5. Replies: 2
    Last Post: 29 Dec 2006, 04:52 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR