Results 1 to 10 of 10
  1. #1
    Join Date
    Dec 2011
    Posts
    8
    Plugin Contributions
    0

    Default 0 DB_ERROR_NOT_CONNECTED in [select * from znc_project_version WHERE project_version_

    "0 DB_ERROR_NOT_CONNECTED
    in:
    [select * from znc_project_version WHERE project_version_key = 'Zen-Cart Database' ]"

    this is after I enabled the strict error reporting. I understand that its something to do with the database, but what and where and how are the questions I have. So far I have made sure that the config files (both of them) are pointing at the correct database. I don't know how to check for the database password. I didn't properly save or back-up before I upgraded as I found out after everything went crazy. I am with Bluehost and their control panel makes it seem as though all I needed to do to upgrade was a few clicks and voila-which was so not the case, ergo why I am here pleading for help.

    I am not sure if the admin config file is correct neither. I feel like it could be something wrong with the following:

    define('HTTP_SERVER', 'http://localhost');
    define('HTTPS_SERVER', 'https://localhost');
    define('HTTP_CATALOG_SERVER', 'http://localhost');
    define('HTTPS_CATALOG_SERVER', 'https://localhost');

    and....

    define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p1) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
    define('DIR_WS_CATALOG', '/');
    define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p2) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
    define('DIR_WS_HTTPS_CATALOG', '/');

    should I replace or add something here or is it suppose to be this way?

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,133
    Plugin Contributions
    11

    Default Re: 0 DB_ERROR_NOT_CONNECTED in [select * from znc_project_version WHERE project_vers

    If you are on your host's server localhost is definitely incorrect in the four defines you listed. It MIGHT be correct for the database but you need to fix the others first. You didn't use an auto loader to install ZC did you?

  3. #3
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 0 DB_ERROR_NOT_CONNECTED in [select * from znc_project_version WHERE project_vers

    Quote Originally Posted by mitch2564 View Post
    their control panel makes it seem as though all I needed to do to upgrade was a few clicks and voila-which was so not the case
    Not surprising. I've not seen any "auto-upgrade" script ever do an upgrade correctly. They should always be avoided.

    Your symptoms suggest that your DB_XXXXXX settings are pointing to an empty database, and/or specifically your DB_PREFIX contains a value that's different from the pattern of the names of the tables in your database.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #4
    Join Date
    Dec 2011
    Posts
    8
    Plugin Contributions
    0

    Default Re: 0 DB_ERROR_NOT_CONNECTED in [select * from znc_project_version WHERE project_vers

    dbltoe,
    Yes I did. The site comes up fine, but the admin is trying to take me to h-e-doublehockeysticks. I refuse to go. Just visiting though.

  5. #5
    Join Date
    Dec 2011
    Posts
    8
    Plugin Contributions
    0

    Default Re: 0 DB_ERROR_NOT_CONNECTED in [select * from znc_project_version WHERE project_vers

    Ok, so I have checked the database and the config folder and the prefixes are the same, the database is full of tables, I put the server name in the empty spots as suggested and still same error. I've checked each line in both config files and now I don't know what else could be the problem. Could someone please point me in the direction to try and reverse this upgrade? I was more than 70percent complete in building it, and I have a lot of things pending on the site being up and running?

  6. #6
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 0 DB_ERROR_NOT_CONNECTED in [select * from znc_project_version WHERE project_vers

    You said the storefront works fine but the admin does not?

    Do you mistakenly have an /admin/includes/local/configure.php that doesn't belong on the server, since it overrides the correct one at /admin/includes/configure.php ?

    Does your admin version of configure.php have the same DB_XXXXXXXX settings as your non-admin configure.php (the files are NOT totally identical, but all the DB_XXXXX settings *should* be identical). If they don't match, then I suggest copying *just* the DB_XXXXX settings from the non-admin configure.php into the admin one.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Dec 2011
    Posts
    8
    Plugin Contributions
    0

    Default Re: 0 DB_ERROR_NOT_CONNECTED in [select * from znc_project_version WHERE project_vers

    Do you mistakenly have an /admin/includes/local/configure.php that doesn't belong on the server, since it overrides the correct one at /admin/includes/configure.php ?
    Answer: No

    Does your admin version of configure.php have the same DB_XXXXXXXX settings as your non-admin configure.php (the files are NOT totally identical, but all the DB_XXXXX settings *should* be identical). If they don't match, then I suggest copying *just* the DB_XXXXX settings from the non-admin configure.php into the admin one.
    Answer: Yes

    I have checked your suggestions and nothing is working. I even tried deleting the config file, redoing the zc install to see if it would create another one, but file ended up empty. I put the file back in place and tried to recreate the 1.3.9 version and put it in place-nothing. I ran zc install again and now I'm getting a 500 error. Do you have any other suggestions? I am at a loss...

  8. #8
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 0 DB_ERROR_NOT_CONNECTED in [select * from znc_project_version WHERE project_vers

    Quote Originally Posted by mitch2564 View Post
    I even tried deleting the config file, redoing the zc install to see if it would create another one, but file ended up empty.
    That sounds like a permissions problem. Or something really really odd with the server you're running it on.

    Quote Originally Posted by mitch2564 View Post
    I put the file back in place and tried to recreate the 1.3.9 version and put it in place-nothing.
    What does "nothing" mean in this context? Blank file?

    Quote Originally Posted by mitch2564 View Post
    I ran zc install again and now I'm getting a 500 error.
    A "500" error is a generic message that means something was refused by the server. The details are not displayed by the server because it's usually a security-related thing and of course you wouldn't want hackers to see what they just triggered so they can try to work around it. Instead you want them to go away.
    So the details of the 500 error can be found in the server's apache errorlog.
    http://www.zen-cart.com/content.php?...l-server-error
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9
    Join Date
    Dec 2011
    Posts
    8
    Plugin Contributions
    0

    Default Re: 0 DB_ERROR_NOT_CONNECTED in [select * from znc_project_version WHERE project_vers

    The 'nothing' meant that there was no change. I think the 500 error is probably because I still have that strict error thing still there. Other than that, I don't know what else I can do besides down grade. Do you have any other suggestions?

  10. #10
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 0 DB_ERROR_NOT_CONNECTED in [select * from znc_project_version WHERE project_vers

    You skipped the proper process of doing a staged upgrade in another folder+database, and you let some automated script make a bunch of random changes to your site's files thus probably overwriting things you had customized. You need to identify what was changed incorrectly, and fix those issues.

    Yes it's unfortunately rather complicated and urgent now because your live store is impacted or even "down" because of using the automated script which knows nothing of your customizations. Sorry.

    Two things I'd try if I were in your shoes:
    a) a fresh install (in another folder and another database) ... to satisfy yourself that you can indeed get a working copy functioning on your server
    Then once that's working, simply compare your site against the working site, and fix whatever needs fixing.

    b) or just jump directly to the comparison stage: http://www.zen-cart.com/wiki/index.p...Obscure_Issues
    These same steps are what one normally follows when upgrading anyway, so it won't hurt doing them.
    And of course fix whatever needs fixing.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. Replies: 2
    Last Post: 19 Jun 2013, 02:17 PM
  2. Replies: 4
    Last Post: 2 Jan 2012, 10:46 PM
  3. select admin_id, admin_name, admin_pass from zen_admin where admin_name =
    By coucho in forum Upgrading from 1.3.x to 1.3.9
    Replies: 3
    Last Post: 19 Jan 2008, 06:15 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