Page 1 of 2 12 LastLast
Results 1 to 10 of 16
  1. #1
    Join Date
    Aug 2013
    Location
    Perth, WA, AU
    Posts
    171
    Plugin Contributions
    3

    Default Connection to Database failed

    Hi

    I have my code ready to go and want to update the database to finish everything off.

    However when I run zc_install I am getting 'connection to database failed'.

    The database details must be correct in configure.php - if I visit the website everything works fine (of course I get the "Your database appears to need patching to a higher level" warning.). Yes I am entering correct Admin login details on screen.

    So any ideas? I am stumped.

    There is nothing untoward in the log files - it simply says it couldn't connect.

    php is 5.4.32 for what its worth.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Connection to Database failed

    A link to this??
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,379
    Plugin Contributions
    9

    Default Re: Connection to Database failed

    Are you able to access your admin?

  4. #4
    Join Date
    Aug 2013
    Location
    Perth, WA, AU
    Posts
    171
    Plugin Contributions
    3

    Default Re: Connection to Database failed

    Yes I can access Admin.

  5. #5
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Connection to Database failed

    Can you compare the files, from your server, for:
    /includes/configure.php
    /your_secret_admin/includes/configure.php

    and ensure that the database settings, password, etc. match beneath the section for:
    Code:
    // define our database connection
    
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #6
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Connection to Database failed

    Quote Originally Posted by royaldave View Post
    Hi

    I have my code ready to go and want to update the database to finish everything off.

    However when I run zc_install I am getting 'connection to database failed'.

    The database details must be correct in configure.php - if I visit the website everything works fine (of course I get the "Your database appears to need patching to a higher level" warning.). Yes I am entering correct Admin login details on screen.

    So any ideas? I am stumped.

    There is nothing untoward in the log files - it simply says it couldn't connect.

    php is 5.4.32 for what its worth.
    Confirm that when logged into the admin that when selecting version in the top right corner that ZC is seeing version 5.4.32 as the active PHP version.

    In times past, it has been identified that the database upgrade only option is independent of the admin. How has this changed in ZC 1.5.4?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  7. #7
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Connection to Database failed

    There also a configure.php file in the includes/local path? If so, what are it's contents? (Obscure DB_PASSWORD information and if included (shouldn't be) any admin or other specifically sensitive information.)

    When pasting in the text block, please first select the # symbol in the toolbar above the message block to provide CODE tags around the code.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  8. #8
    Join Date
    Aug 2013
    Location
    Perth, WA, AU
    Posts
    171
    Plugin Contributions
    3

    Default Re: Connection to Database failed

    Sorry for the delay. I discovered I had an issue with my host where changing the php version wasn't working. Turns out it was a problem with my .htaccess file which has now been fixed. I am definately running 5.4.32 - and have also tried 5.5 to get around this issue (didn't work).

    Here is my /includes/configure.php

    Code:
    <?php
    /**
     * @package Configuration Settings circa 1.5.1
     * @copyright Copyright 2003-2012 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * File Built by zc_install on 2013-09-17 02:05:00
     */
    
    
    // For Multi Site
    include_once('includes/config_sites/sites_switch.php');
    
    
    /*************** NOTE: This file is similar, but DIFFERENT from the "admin" version of configure.php. ***********/
    /***************       The 2 files should be kept separate and not used to overwrite each other.      ***********/
    
    
    
      // Define the webserver and path parameters
      // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
      // HTTPS_SERVER is your Secure webserver: eg- https://www.your_domain.com
    
      define('HTTP_SERVER', 'http://www.funkyballoons.com.au');
      define('HTTPS_SERVER', 'https://www.funkyballoons.com.au');
    
    
    
    
      // 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', '/zencart154/');
      define('DIR_WS_HTTPS_CATALOG', '/zencart154/');
      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', '/clientdata/n5200-2-static/f/u/funkyballoons.com.au/www/zencart154/');
    
    
      //the following path is a COMPLETE path to the /logs/ folder  eg: /var/www/vhost/accountname/public_html/store/logs ... and no trailing slash
    
      define('DIR_FS_LOGS', '/clientdata/n5200-2-static/f/u/funkyballoons.com.au/www/zencart154/logs');
    
      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', '');
      define('DB_CHARSET', 'utf8');
      define('DB_SERVER', 'mysql-2.netregistry.net');
      define('DB_SERVER_USERNAME', 'xxxxxxx');
      define('DB_SERVER_PASSWORD', 'xxxxxx');
      define('DB_DATABASE', 'Zen_Cart_1_3_9h_3_0_funkyballoons_com_au');
    
    
    
      // 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', '/clientdata/n5200-2-static/f/u/funkyballoons.com.au/www/zencart154/cache');
    
    // EOF

  9. #9
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Connection to Database failed

    What happens if you comment out the multi-site includes line? (Preface with //)

    And only long enough to test the upgrade.
    Last edited by mc12345678; 19 May 2015 at 11:46 AM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #10
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Connection to Database failed

    I get your site when I navigate to

    http: //funkyballoons dot com dot au/zencart154/

    No issue connecting to DB
    Zen-Venom Get Bitten

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v150 Database Setup Issue: Connection to Database failed, on iPage
    By tempoart in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 10 Jul 2012, 07:43 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