Page 1 of 4 123 ... LastLast
Results 1 to 10 of 36
  1. #1
    Join Date
    Jun 2012
    Location
    Oklahoma
    Posts
    39
    Plugin Contributions
    0

    Default Cannot Connect Database When Upgrading from v1.5.0 to v1.5.5

    I'm at the point where I need to see the demo side of my new site but I can't get that. I tried upgrading to v1.5.4 and I managed to get the zc_install screen, but the "update" button wasn't even an option because my database wasn't connected. So I figured, what the heck, let's try 1.5.5 and now I can't even access the zc_install screen. All I get is a white screen on my demo site and "this page isn't working: HTTP ERROR 500" at my demo admin address. I installed my new version of Zencart in separate folders, I copied my database and uploaded it as a new database in myphp (v5.5.38).

    My admin/includes/configure.php and includes/configure.php have the correct password and database names. I've copied the ones from my live v1.5.0 site and just changed the the info to my new password and database with no luck. I've searched the forums for solutions that might work for my problems with no luck. It's probably something minor that I've overlooked somewhere.

    The new site will be actually be completely different than the original template-wise, I just need to keep the products. But I haven't even been ableto get to the part where I see the classic green Zencart version of my site. SO frustrated right now. Please please help.


  2. #2
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Cannot Connect Database When Upgrading from v1.5.0 to v1.5.5

    Within your Hosting Control Panel there should be an area for MySQL and within the area you should be able to select your database and run a Repair. That has helped others with the same problem. If may also solve your problem and if not, it takes the database out of the equation of problem area allowing other methods to be tried.

    Actually, re-reading your post I can see my suggestion won't help with the problem you are having now but it is a good thing to do anyway.

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

    Default Re: Cannot Connect Database When Upgrading from v1.5.0 to v1.5.5

    There is likely an error logged in the logs directory as a result of the blank screen during the install process.

    With ZC 1.5.5, how did the install without the transferred database go? See: http://www.zen-cart.com/entry.php?3-...d-of-upgrading
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Cannot Connect Database When Upgrading from v1.5.0 to v1.5.5

    If you are upgrading from v1.5.0 to 1.5.5 within a password protected dev or test area, password protecting is important, then you need to copy all files from the live site into it. Setup the database with a different name so you don't accidentally touch the live site with your changes.

    When working with dev / test site in a sub-directory, the syntax should be like so.

    Code:
    define('HTTP_SERVER', 'http://example.com/zctest');
    define('HTTPS_SERVER', 'https://example.com/zctest');
    ...
    define('DIR_WS_CATALOG', '/');
    define('DIR_WS_HTTPS_CATALOG', '/');
    ...
    define('DIR_FS_CATALOG', '/home/username/public_html/zctest/');
    Where 'zctest' is the name of your sub-directory.

    The above applies to both configure files where necessary.

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

    Default Re: Cannot Connect Database When Upgrading from v1.5.0 to v1.5.5

    And if you go the route of creating an operating backup of your live site as it appears to be suggested in the previous post, then also create a separate second (third, fourth, or fifth, etc) location in which to store the new files and add in/modify them to look/operate like or better than your existing store.

    Trying to ensure to remove files no longer used by ZC can become troublesome if comparison software is not used. Upgrading in place can be far more troublesome than starting with a fresh copy and incorporating necessary modifications which is why the previous reference to the suggested method of upgrade by rebuild.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Jun 2012
    Location
    Oklahoma
    Posts
    39
    Plugin Contributions
    0

    Default Re: Cannot Connect Database When Upgrading from v1.5.0 to v1.5.5

    This is my admin/includes/configure.php:

    <?php
    /**
    * @package Configuration Settings
    * @copyright Copyright 2003-2016 Zen Cart Development Team
    * @copyright Portions Copyright 2003 osCommerce
    * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    * @version $Id: Author: DrByte Thu Dec 17 11:49:31 2015 -0500 Modified in v1.5.5 $
    * @private
    */

    /*************** NOTE: This file is VERY similar to, but DIFFERENT from the "store" version of configure.php. ***********/
    /*************** The 2 files should be kept separate and not used to overwrite each other. ***********/

    /**
    * Enter the domain for your Admin URL. If you have SSL, enter the correct https address in the HTTP_SERVER setting, instead of just an http address.
    */
    define('HTTP_SERVER', 'https://flyingeaglecoin.com/zen_new');
    /**
    * Note about HTTPS_SERVER:
    * There is no longer an HTTPS_SERVER setting for the Admin. Instead, put your SSL URL in the HTTP_SERVER setting above.
    */

    /**
    * Note about DIR_WS_ADMIN
    * The DIR_WS_ADMIN value is now auto-detected.
    * In the rare case where it cannot be detected properly, you can add your own DIR_WS_ADMIN definition below.
    */

    /**
    * Enter the domain for your storefront URL.
    * Enter a separate SSL URL in HTTPS_CATALOG_SERVER if your store supports SSL.
    */
    define('HTTP_CATALOG_SERVER', 'https://flyingeaglecoin.com');
    define('HTTPS_CATALOG_SERVER', 'https://flyingeaglecoin.com');

    /**
    * Do you use SSL for your customers login/checkout on the storefront? If so, enter 'true'. Else 'false'.
    */
    define('ENABLE_SSL_CATALOG', 'true');

    /**
    * These DIR_WS_xxxx values refer to the name of any subdirectory in which your store is located.
    * These values get added to the HTTP_CATALOG_SERVER and HTTPS_CATALOG_SERVER values to form the complete URLs to your storefront.
    * They should always start and end with a slash ... ie: '/' or '/foldername/'
    */
    define('DIR_WS_CATALOG', '/zen_new/');
    define('DIR_WS_HTTPS_CATALOG', '/zen_new/');

    /**
    * This is the complete physical path to your store's files. eg: /var/www/vhost/accountname/public_html/store/
    * Should have a closing / on it.
    */
    define('DIR_FS_CATALOG', '/home4/fresh1/public_html/zen_new/');

    /**
    * NOTE about DIR_FS_ADMIN
    * The value for DIR_FS_ADMIN is now auto-detected.
    * In the very rare case where there is a need to override the autodetection, simply add your own definition for it below.
    */

    /**
    * The following settings define your database connection.
    * These must be the SAME as you're using in your non-admin copy of configure.php
    */
    define('DB_TYPE', 'mysql'); // always 'mysql'
    define('DB_PREFIX', ''); // prefix for database table names -- preferred to be left empty
    define('DB_CHARSET', 'utf8'); // 'utf8' or 'latin1' are most common
    define('DB_SERVER', 'localhost'); // address of your db server
    define('DB_SERVER_USERNAME', 'fresh1');
    define('DB_SERVER_PASSWORD', 'XXXXXX');
    define('DB_DATABASE', 'fresh1_zen');

    /**
    * This is an advanced setting to determine whether you want to cache SQL queries.
    * Options are 'none' (which is the default) and 'file' and 'database'.
    */
    define('SQL_CACHE_METHOD', 'database');

    /**
    * Reserved for future use
    */
    define('SESSION_STORAGE', 'temporary value added by zc_install');

    /**
    * Advanced use only:
    * The following are OPTIONAL, and should NOT be set unless you intend to change their normal use. Most sites will leave these untouched.
    * To use them, uncomment AND add a proper defined value to them.
    */
    // define('DIR_FS_SQL_CACHE' ...
    // define('DIR_FS_DOWNLOAD' ...
    // define('DIR_FS_LOGS' ...

    // End Of File

  7. #7
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Cannot Connect Database When Upgrading from v1.5.0 to v1.5.5

    I do not see a problem within the Admin config file you provided.

    All I get is a white screen on my demo site and "this page isn't working: HTTP ERROR 500" at my demo admin address.
    What does your Apache error log say as the reason for the 500 error?

  8. #8
    Join Date
    Jun 2012
    Location
    Oklahoma
    Posts
    39
    Plugin Contributions
    0

    Default Re: Cannot Connect Database When Upgrading from v1.5.0 to v1.5.5

    this is the most recent DEBUG file
    [20-Apr-2017 15:47:29 America/Chicago] PHP Parse error: syntax error, unexpected '[' in /home4/fresh1/public_html/zen_new/admin/includes/classes/db/mysql/query_factory.php on line 64

    I haven't even touched this file.

  9. #9
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,475
    Plugin Contributions
    88

    Default Re: Cannot Connect Database When Upgrading from v1.5.0 to v1.5.5

    What version of PHP is being used on the site?

    Would you post the contents of "Line 64" for that query_factory.php file? There are currently 5+ different versions of Zen Cart 1.5.5 ... which one are you installing?

  10. #10
    Join Date
    Jun 2012
    Location
    Oklahoma
    Posts
    39
    Plugin Contributions
    0

    Default Re: Cannot Connect Database When Upgrading from v1.5.0 to v1.5.5

    PHP version 5.5.38 (Zend: 2.5.0)

    line 64: $this->link = mysqli_connect[$zf_host, $zf_user, $zf_password, $zf_database, (defined('DB_PORT') ? DB_PORT : NULL], (defined('DB_SOCKET') ? DB_SOCKET : NULL));

    Zencart v1.5.5e, does that tell you which one? I had no idea there were so many

 

 
Page 1 of 4 123 ... LastLast

Similar Threads

  1. v153 Database errors when upgrading from 1.5.3 to the latest 1.5.5a
    By icecold in forum Upgrading to 1.5.x
    Replies: 3
    Last Post: 14 Oct 2016, 04:13 PM
  2. v138a Cannot connect to database
    By blueroomhermit in forum General Questions
    Replies: 10
    Last Post: 17 Nov 2013, 03:43 AM
  3. blank page when upgrading the database from 1.3.8a to 1.3.8h
    By dragosionel in forum Upgrading from 1.3.x to 1.3.9
    Replies: 1
    Last Post: 20 Oct 2011, 05:36 PM
  4. 1064 SQL Syntax error when upgrading database from 1.3.8 to 1.3.9
    By pioupioun in forum Upgrading from 1.3.x to 1.3.9
    Replies: 5
    Last Post: 23 Aug 2010, 06:26 AM
  5. Cannot Connect To Database...
    By kbalona in forum General Questions
    Replies: 2
    Last Post: 3 May 2007, 07:41 PM

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