Page 1 of 4 123 ... LastLast
Results 1 to 10 of 33
  1. #1
    Join Date
    Sep 2006
    Posts
    111
    Plugin Contributions
    0

    Default Can't connect to my database.

    Hi, I have read through almost every post i could find and and tried all what they have said and have had no luck so I thought I'd write in my problem...

    My host has recently changed me from one server to another server....My shop was working great before that.....Until the change over........I do run with a control panel...............But my home page comes up with now nddbc.html page saying can not connect to data base..............My admin has this error.............
    0 DB_ERROR_NOT_CONNECTED
    in:
    [delete from zen_db_cache]
    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.

    I just don't understand.................In my control panel it does show the data bases...........Any clues on how to help me or maybe point me in the right direction.................I am even will to let one of the zencart administrators have a look in all my settings to see if you can see the problem.. I do hope someone can help.................My business has been out of action for 12 days now and I am loosing so much money and sales............My host has said they have done everything they could but that is not good enough when they created this mess...................PLEASE HELP

  2. #2
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Can't connect to my database.

    Assuming they didn't change your database name, username or password (which would be plain daft and rather obvious), it is most likely that they are using an explicit path to the server where your database is being held (rather than a generic one like localhost).

    As that path has changed, your includes/configure.php and admin/includes/configure.php files need to be changed to reflect the new information.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  3. #3
    Join Date
    Sep 2006
    Posts
    111
    Plugin Contributions
    0

    Default Re: Can't connect to my database.

    How would I find out the correct information to enter that into the configure.php files...........I looked everywhere and can't seem to find it.

  4. #4
    Join Date
    Sep 2006
    Posts
    111
    Plugin Contributions
    0

    Default Re: Can't connect to my database.

    This is my Configure.php file....................do you see any thing that should not be there.................

    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/precutdi/public_html/mystore/');
    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'); // eg, localhost - should not be empty
    define('DB_SERVER_USERNAME', 'mystore');
    define('DB_SERVER_PASSWORD', 'mypassword');
    define('DB_DATABASE', 'mystore');
    define('USE_PCONNECT', false); // use persistent connections?
    define('STORE_SESSIONS', 'db'); // leave empty '' for default handler or set to 'db'
    // 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/precutdi/public_html/mystore/cache');

  5. #5
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Can't connect to my database.

    What I'm suspecting is that following the move of your database to another server, you may need to put something more explicit in this line
    define('DB_SERVER', 'localhost');
    However, the only people who can truly know what needs to go in this and the other lines nearby, is your web host as they are the ones who have configured your account.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  6. #6
    Join Date
    Sep 2006
    Posts
    111
    Plugin Contributions
    0

    Default Re: Can't connect to my database.

    Thanks for that.................I have had more help from you in 1 hour then I have from them in 12 days.................

    I will get in contact with them to find out what does need to be there.

    Thanks Heaps, Hopefully that works.

    I shall be back.............

  7. #7
    Join Date
    Sep 2006
    Posts
    111
    Plugin Contributions
    0

    Default Re: Can't connect to my database.

    Ok I am back...................Could you please translate this in english for me............I know some things about this but I need a little help here.......

    This is what my server had to say. Plus I'm not sure of any welcome email. Should I have received one with the change over?

    The configure.php uses the server name as localhost , so probably you do not need to change it. Only if in mysql server you have mentioned the hostname as IP of server , then you need to replace it with new server IP as provided in welcome email.

  8. #8
    Join Date
    Sep 2006
    Posts
    111
    Plugin Contributions
    0

    Default Re: Can't connect to my database.

    Hi again,

    They did send through this email

    The new server IP is **.**.***.***, since you have used localhost, you need not change anything in configure.php

    (not sure if I should have written the IP in there or not)

    I have put this IP in that server section and that doesn't work.........

    So what do I do now?

  9. #9
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Can't connect to my database.

    There's no harm in putting the IP address in. What you would need to do now is double check your database name, username and password. If any one of these is off, it will prevent a connection. If all four (inc IP address) is correct, then the database server must be unavailable.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  10. #10
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Can't connect to my database.

    One other thing to check is that any changes to your configure files are arriving safely. They're write protected, so some FTP programs simply and silently turn away and the changes don't actually happen.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

 

 
Page 1 of 4 123 ... LastLast

Similar Threads

  1. Help! Site can't connect to my database
    By mw4kids in forum Upgrading from 1.3.x to 1.3.9
    Replies: 7
    Last Post: 15 Jun 2009, 10:04 PM
  2. During Zencart Installation, Can't connect to Database. WHy?
    By myjasonlee in forum Installing on a Linux/Unix Server
    Replies: 13
    Last Post: 21 Dec 2008, 04:16 PM
  3. Can't connect to database during installation
    By isaacr25 in forum Installing on a Linux/Unix Server
    Replies: 14
    Last Post: 29 Sep 2007, 06:34 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