Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2016
    Location
    UK
    Posts
    5
    Plugin Contributions
    0

    Default Moved site to Localhost for testing, cannot get past the

    using: v1.5.4 since install.
    No plugs, template added > 'Hoki' (looks nice, pretty clunky wouldnt recommend just fyi).
    Cannot get past the 'You are seeing this page for one or more reasons' page.

    Have rejigged and rejigged the 2 x config files again and again. Posting with sensitive detail ****'ed out.

    I can connect to the DB just fine using php. the DB is copied directly from the original site, imported from the mysql dump and is populated. No ssl setup as just for testing on localhost.

    Code:
    <?php
    /**
     * @package Configuration Settings circa 1.5.4
     * @copyright Copyright 2003-2014 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 2016-06-14 03:41:42
     */
    
    
    /*************** 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', 'localhost/shop/');
      define('HTTPS_SERVER', '');
    
      // 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', '/');
      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', '/var/****/www/html/shop/');
    
      //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', '/var/****/www/html/shop/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', 'st1');
      define('DB_CHARSET', 'utf8');
      define('DB_SERVER', 'localhost');
      define('DB_SERVER_USERNAME', '*****');
      define('DB_SERVER_PASSWORD', '*****');
      define('DB_DATABASE', '*****');
    
      // 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', '/var/*****/www/html/shop/cache');
    
    // EOF
    and

    Code:
    <?php
    /**
     * @package Configuration Settings circa 1.5.4
     * @copyright Copyright 2003-2014 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 2016-06-14 03:41:42
     */
    
    
    /*************** NOTE: This file is similar, but DIFFERENT from the "store" version of configure.php. ***********/
    /***************       The 2 files should be kept separate and not used to overwrite each other.      ***********/
    
    /**
     * WE RECOMMEND THAT YOU USE SSL PROTECTION FOR YOUR ENTIRE ADMIN:
     * To do that, make sure you use a "https:" URL for BOTH the HTTP_SERVER and HTTPS_SERVER entries:
     */
      define('HTTP_SERVER', 'localhost/shop/');
      define('HTTPS_SERVER', '');
      define('HTTP_CATALOG_SERVER', 'localhost/shop/');
      define('HTTPS_CATALOG_SERVER', '');
    
      // secure webserver for admin?  Valid choices are 'true' or 'false' (including quotes).
      define('ENABLE_SSL_ADMIN', 'false');
    
      // secure webserver for storefront?  Valid choices are 'true' or 'false' (including quotes).
      define('ENABLE_SSL_CATALOG', 'false');
    
      define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', zen_parse_url(HTTP_SERVER, '/path')) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
      define('DIR_WS_CATALOG', '/');
      define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', zen_parse_url(HTTPS_SERVER, '/path')) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
      define('DIR_WS_HTTPS_CATALOG', '/');
    
    // 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_IMAGES', 'images/');
      define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
      define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/');
      define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/');
      define('DIR_WS_INCLUDES', 'includes/');
      define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
      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_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/');
    
    // * DIR_FS_* = Filesystem directories (local/physical)
      define('DIR_FS_ADMIN', preg_replace('#.includes$#', '', realpath(dirname(__FILE__) . '/../') . '/'));
      //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
      define('DIR_FS_CATALOG', '/var/*****/www/html/shop/');
    
      //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', '/var/*****/www/html/shop/logs');
    
      define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
      define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
      define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
      define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/');
      define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');
      define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');
      define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
    
    // define our database connection
      define('DB_TYPE', 'mysql');
      define('DB_PREFIX', 'st1');
      define('DB_CHARSET', 'utf8');
      define('DB_SERVER', 'localhost');
      define('DB_SERVER_USERNAME', '*****');
      define('DB_SERVER_PASSWORD', '*******'');
      define('DB_DATABASE', '****');
    
      // 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', '/var/****/www/html/shop/cache');
    
    
    // Define the webserver and path parameters
      // Main webserver: eg-http://www.your_domain.com - 
      // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
      // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
      // HTTP_CATALOG_SERVER is your Main webserver: eg-http://www.your_domain.com
      // HTTPS_CATALOG_SERVER is your Secure webserver: eg-https://www.your_domain.com
      /* 
       * URLs for your site will be built via:  
       *     HTTP_SERVER plus DIR_WS_ADMIN or
       *     HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or 
       *     HTTP_SERVER plus DIR_WS_CATALOG or 
       *     HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG
       * ...depending on your system configuration settings
       */
    // EOF
    any ideas greatly appreciated!

  2. #2
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,589
    Plugin Contributions
    30

    Default Re: Moved site to Localhost for testing, cannot get past the

    It can only be db credentials or a path in wrong in one of the configures.

    Nontheless despite having setup local servers umpteen times without problems...once I could not get it to work despite being sure everything was ok.

    In the end I ran the installer to create the configure files from new/as if it was a new install, just to prove it could work in that particular local environment and to show what was wrong in the ones I had.

    Then I copied those local configure.phps to the /local folders:
    includes/local/configure.php in both catalog and admin.

    Then I copied the hosting configure.php to overwrite the ones in the usual location (these should be ignored when there are configures in /local folders).

    Then imported the real database again.

    At the time I could could find no reason why I had to do that...athough there would have been one, it isn't black magic.
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

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

    Default Re: Moved site to Localhost for testing, cannot get past the

    And if you want to do all that without having to reimport the database, you could use a DB_PREFIX for the install that is currently not used in the DB, then modify the configure.php files to use whatever DB_PREFIX is/was currently populated.

    Otherwise, looks like there are a few things odd: localhost without a protocol (http:// or otherwise), the end of the HTTP_SERVER constant includes a slash as well as the DIR_WS_CATALOG, in most correctly built pages this will result in a url of 'localhost/shop//' as torvista was saying as well, the 'shop' directory path may need to be located in the DIR_WS_CATALOG constant but letting the software do the install should provide a functional version of the configure.php files.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Feb 2008
    Posts
    529
    Plugin Contributions
    0

    Default Re: Moved site to Localhost for testing, cannot get past the

    Would it make a difference what php version is involved?

    I've had similar problem copying livesite to work on desktop WAMP server. Copying test site config files into live site files didn't seem to do the trick (two zc config files and 2 wp config files from WP4Zen mod.)

    My WAMP server uses php version 5.6.15. I recently change live site hosts and they have selectable php in c-panel. I went to change it up to php 5.6 and got an error message: Warning: Changing php modules and php options via PHP Selector for native php version is impossible. It's set as 'native 5.4' which is what shows on my admin/version info (5.4.12)

    I wonder if that could be an issue at play, or just a red herring.

    Site was originally built on WAMP but a few computers ago and I don't recall php version, but site was zc 1.3.7.

    Currently using zc 1.5.5a. Updated through the 1.3.x years, then rebuilt `1.5.0 and updated since. Also using Responsive Sheffield Blue with forum suggested alterations by rbarbour, dr b and others to function with 1.5.5a

  5. #5
    Join Date
    Aug 2005
    Location
    Bondi, Australia
    Posts
    100
    Plugin Contributions
    0

    Default Re: Moved site to Localhost for testing, cannot get past the

    Quote Originally Posted by torvista View Post
    Then I copied those local configure.phps to the /local folders:
    includes/local/configure.php in both catalog and admin.
    I'm surprised to hear about the use of a "local" folder for development configures. How long has this been a feature? Is there any online documentation about setting these up? There's certainly nothing about them in the install wizards for 1.5.x

  6. #6
    Join Date
    Dec 2009
    Location
    Amersfoort, The Netherlands
    Posts
    2,846
    Plugin Contributions
    25

    Default Re: Moved site to Localhost for testing, cannot get past the

    Quote Originally Posted by lucidlee View Post
    I'm surprised to hear about the use of a "local" folder for development configures. How long has this been a feature? Is there any online documentation about setting these up? There's certainly nothing about them in the install wizards for 1.5.x
    It has been there at least since the 1.3 series, but it has always been a well kept secret . I think it is/was mentioned in a comment in one of the configure.php files.

 

 

Similar Threads

  1. v151 Cannot get past license agreement
    By Kelan in forum Installing on a Linux/Unix Server
    Replies: 11
    Last Post: 7 Aug 2013, 02:35 AM
  2. Cannot Get Into Admin, I Moved the Site...ooops
    By KathyDV in forum Installing on a Mac Server
    Replies: 6
    Last Post: 20 May 2009, 11:19 PM
  3. Cannot Get Past Liscense Agreement
    By studioonedj in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 16 Jan 2008, 07:20 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