Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2008
    Posts
    10
    Plugin Contributions
    0

    Default Copying old version

    |Hi. I've gotten a file dump and database dump of an old Zen Cart install. I'm using the domain/server migration tutorial.
    https://www.zen-cart.com/content.php?141
    When I access the zc_install folder in the browser, it's blank. Looking at the source code it renders the document head and dies. Looking further, it looks like it chokes on

    Code:
    require(DIR_WS_INSTALL_TEMPLATE . 'common/main_template_vars.php');
    in index.php. The file above exists, but I haven't started inserting echo statements to debug yet. I turned on php error display/logging but all that shows is a deprecated function. The full code for the index.php is below which may help determine the version - it dates back to 2007 I guess? Can anyone give me guidance on what might be wrong, or what I might do to get the install running?

    Code:
    <?php
    /**
     * index.php -- This is the main hub file for the Zen Cart installer
     * @package Installer
     * @access private
     * @copyright Copyright 2003-2007 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: index.php 7404 2007-11-11 04:09:50Z drbyte $
     */
      define('IS_ADMIN_FLAG',true);
    /*
     * Ensure that the include_path can handle relative paths, before we try to load any files
     */
      if (!strstr(ini_get('include_path'), '.')) ini_set('include_path', '.' . PATH_SEPARATOR . ini_get('include_path'));
    /*
     * Initialize system core components
     */
      require('includes/application_top.php');
      /* This is for debug purposes to run installer from command line. Set to true to enable it:  */
      if (false) {
        if ($argc > 0) {
          for ($i=1;$i<$argc;$i++) {
            $it = split("=",$argv[$i]);
            $_GET[$it[0]] = $it[1];
            // parse_str($argv[$i],$tmp);
            // $_REQUEST = array_merge($_REQUEST, $tmp);
          }
        }
      }
      // init vars:
    	$zc_first_field = '';
    
      // begin processing page-specific actions
      if (!isset($_GET['main_page']) || !zen_not_null($_GET['main_page'])) $_GET['main_page'] = 'index';
      $current_page = $_GET['main_page'];
      $page_directory = 'includes/modules/pages/' . $current_page;
      $language_page_directory = 'includes/languages/' . $language . '/';
      require($language_page_directory . $current_page . '.php');
      require('includes/languages/' . $language . '.php');
    
      $zc_install->logDetails('$_POST = ' . print_r($_POST, true) . print_r($_SESSION, true), $current_page . '-index.php', 'testing_flow');
      $zc_install->logDetails($zc_install->getConfigKey('*', true), $current_page . '-index.php - before header_php', 'testing_flow');
    
    
      require($page_directory . '/header_php.php');
    
      require(DIR_WS_INSTALL_TEMPLATE . 'common/html_header.php');
      $zc_install->logDetails($zc_install->getConfigKey('*', true), $current_page . '-index.php - AFTER header_php', 'testing_flow');
    
      require(DIR_WS_INSTALL_TEMPLATE . 'common/main_template_vars.php');
      require(DIR_WS_INSTALL_TEMPLATE . 'common/tpl_main_page.php');
    
    
    ?>

  2. #2
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Copying old version

    It would appear that the version of ZC that you have is older than what basically is supportable on your new system/server. While there are many files that remain dated 2007, the installer has been updated rather frequently. So a couple of things to do/find out.

    If you have a database backup, then there isn't much needed of the zc_install process at this point that could not be discovered in other ways.

    Are you really trying to get the old store up under the old version of ZC, or are you trying to get it upgraded? Why is it being "moved"?

    To keep the same potentially 11 year-old software running on a different machine than it is currently (that's an assumption that the backups are from a currently live site), then the new location needs to have nearly the same php setup (probably 5.2.x) as the current location. This is also why the deprecated function message appeared (php version differences).

    Not really sure what it is you are wanting to do next to be able to advise for or against that action. Ultimately, the software has been updated and modified so much that the database is about all that is likely to be of much value, though it may be possible to see some "features" that were made available by comparison of the old software with a vanilla version of that old software.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Oct 2008
    Posts
    10
    Plugin Contributions
    0

    Default Re: Copying old version

    Quote Originally Posted by mc12345678 View Post
    It would appear that the version of ZC that you have is older than what basically is supportable on your new system/server. While there are many files that remain dated 2007, the installer has been updated rather frequently. So a couple of things to do/find out.

    If you have a database backup, then there isn't much needed of the zc_install process at this point that could not be discovered in other ways.

    Are you really trying to get the old store up under the old version of ZC, or are you trying to get it upgraded? Why is it being "moved"?

    To keep the same potentially 11 year-old software running on a different machine than it is currently (that's an assumption that the backups are from a currently live site), then the new location needs to have nearly the same php setup (probably 5.2.x) as the current location. This is also why the deprecated function message appeared (php version differences).

    Not really sure what it is you are wanting to do next to be able to advise for or against that action. Ultimately, the software has been updated and modified so much that the database is about all that is likely to be of much value, though it may be possible to see some "features" that were made available by comparison of the old software with a vanilla version of that old software.
    Thanks for replying.

    Basically, I have been tasked with getting the products and categories out of the old install and onto another platform (because politics). The live site is currently running on a server that I can't get at (also because politics). All I've been able to do is get the files and DB.

    The migration requires that the zen cart install and donor install be running on the same server, and I'm betting that the migration process will need a newer version of the software than what I have.

    I'm happy to try and upgrade the zen cart software to current, if that's feasible given that I don't have a working install of the legacy software. Otherwise, if I can do a clean install and pull in the database and product images, if the current software can consume the old DB. If you can point me at any potential solutions, I would be grateful.
    Last edited by turniphead; 15 Jan 2018 at 11:37 PM.

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

    Default Re: Copying old version

    You can use the old db and images with a new install. Main concern is PHP on the server you'll use. We normally recommend following https://www.zen-cart.com/entry.php?3...d-of-upgrading.

    https://www.zen-cart.com/content.php...o-run-zen-cart will let you know which version will run on the server you're using.

    Since you're not headed to a final zen cart solution, just pick the version that works with your sever's PHP, load that version with the instructions above, import the old DB and let it upgrade.

    That should get you where you want to go.

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

    Default Re: Copying old version

    If all you're doing is extracting data, you don't need to run the software. Just import the database and then work on extracting the data you need.
    .

    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.

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

    Default Re: Copying old version

    All you need are the images and the textual info in the database products table and maybe categories. Export those to a csv and manipulate that (image links etc.) to import to the new platform.
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  7. #7
    Join Date
    Oct 2008
    Posts
    10
    Plugin Contributions
    0

    Default Re: Copying old version

    Thank you all for your kindness in helping.

    I'm going to shoot for a fresh install and see if I can get the data in. Not what I signed up for, but I might learn something.

    I'll post back and let you know how I get on.

  8. #8
    Join Date
    Oct 2008
    Posts
    10
    Plugin Contributions
    0

    Default Re: Copying old version

    I wanted to update the kind folk who helped me. I was on a wild goose chase. I'm told the live site is actually running 1.5.3. I think the zc_install folder was a red herring from the distant past. It was actually named zc_install<integer> - I'm assuming the original developer just renamed it when the install was done, rather than delete it. And it's sat there with its decade-old files ever since. I thought I needed the folder because https://www.zen-cart.com/content.php?141 said so.

    Equipped with the new facts, I copied the files over minus the zc_install directory. I imported the database and updated the configure.php files to reflect domain, path and DB settings. I also needed to copy one of the multisite config files and make a version for the installation domain.

    Loaded up the URL and got 500 server errors. Logs revealed errors related to php 4 code in seo urls extension - using ereg_replace() function, etc. I swapped those out and the site came right up!

 

 

Similar Threads

  1. Copying working version to non-working version
    By rensing in forum General Questions
    Replies: 12
    Last Post: 3 Sep 2014, 09:41 PM
  2. Copying customer details from old site
    By totalsam in forum Managing Customers and Orders
    Replies: 10
    Last Post: 12 Oct 2010, 12:54 PM
  3. Copying background from old site to new one
    By clay2299 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 30 Jul 2010, 12:48 AM
  4. Deleting an old version of a contribution
    By gob33 in forum Contribution-Writing Guidelines
    Replies: 2
    Last Post: 30 Mar 2009, 10:16 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