Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26
  1. #21
    Join Date
    Sep 2012
    Posts
    20
    Plugin Contributions
    0

    Default Re: "Unable to connect to database" when pressing Save System Settings

    Quote Originally Posted by DrByte View Post
    That's caused by incorrect database details.
    It uses the DB_TYPE, DB_PREFIX, DB_CHARSET, DB_SERVER, DB_SERVER_USERNAME, DB_SERVER_PASSWORD, DB_DATABASE settings when determining where and how to connect.
    So, while you said earlier that you'd checked the configure.php, I must ask again: do the DB_XXXXXX settings in your /includes/configure.php file match what you had entered into zc_install during the Database Setup stage?

    Yeah it all matches. And the tables are all written after the databse settings part so at the very least at that point the connection details are all correct. But for whatever reason after writing to the DB its no longer able to connect for the system setup on the next step. If the parameters were incorrect wouldnt it have trouble writing the db tables ?

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

    Default Re: "Unable to connect to database" when pressing Save System Settings

    No, not necessarily.

    The part that populates the database directly uses the settings you typed in.
    And then it saves those settings to the configure.php file.
    And then all the subsequent pages (System Settings, as well as the storefront later) rely on reading that data back in from the configure.php file.

    Yours is recognizing the configure.php file as "present". But can't connect to the database when using the information therein.

    Maybe you're using special characters in your username/password, and it's getting confused? Try using only letters and numbers and underscores, not any other symbols or spaces.
    .

    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.

  3. #23
    Join Date
    Sep 2012
    Posts
    20
    Plugin Contributions
    0

    Default Re: "Unable to connect to database" when pressing Save System Settings

    Quote Originally Posted by DrByte View Post
    No, not necessarily.

    The part that populates the database directly uses the settings you typed in.
    And then it saves those settings to the configure.php file.
    And then all the subsequent pages (System Settings, as well as the storefront later) rely on reading that data back in from the configure.php file.

    Yours is recognizing the configure.php file as "present". But can't connect to the database when using the information therein.

    Maybe you're using special characters in your username/password, and it's getting confused? Try using only letters and numbers and underscores, not any other symbols or spaces.
    the username is 5 lowercase letters. The password is all letters with the exeption that the first character is a number. I am willing to PM you the username and password, which you can probably see in the video anyway, and you are welcome to try the setup wizard yourself if you are interested in looking at it yourself. All of this is currently set up on a temporary account for testing purposes so I wouldnt mnd letting you look under the hood.

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

    Default Re: "Unable to connect to database" when pressing Save System Settings

    Found it.

    Your server has that stupid APC caching system enabled, and so all the PHP files, including the configure.php file, were serving up OLD content, and so the server was trying to connect to the database using bad info that it had cached.

    BEST FIX: Get your server admin to completely disable APC and any other PHP caching from your hosting account.

    ALTERNATE FIX: add the following line to the top of the following files:
    PHP Code:
    <?php if (function_exists('apc_clear_cache')) @apc_clear_cache(); ?>
    /zencart/index.php
    /zencart/zc_install/index.php
    /zencart/admin/includes/application_top.php
    .

    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.

  5. #25
    Join Date
    Sep 2012
    Posts
    20
    Plugin Contributions
    0

    Default Re: "Unable to connect to database" when pressing Save System Settings

    I'll confirm success after deleting 1.3 and working with 1.5 again for any future references to someone having the problem.

  6. #26
    Join Date
    Sep 2012
    Posts
    20
    Plugin Contributions
    0

    Default Re: "Unable to connect to database" when pressing Save System Settings

    Quote Originally Posted by tmdea View Post
    I'll confirm success after deleting 1.3 and working with 1.5 again for any future references to someone having the problem.
    OK problem solved using the php directives. Will try with the APC disabling when my admin becomes available tomorrow. Thanks again.

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Store "forgets" whats in the basket when pressing "Home"?
    By deanparkr in forum General Questions
    Replies: 1
    Last Post: 7 Dec 2008, 05:55 PM
  2. No "save server settings" button during install?!?
    By rvanweerd in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 23 May 2006, 06:58 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