Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Posts
    20
    Plugin Contributions
    0

    Default Move install dir - having problems

    I have Zen installed in domain.com/store and I had X-Cart installed in domain.com/shop

    So I ditched x-cart and now want to change the Zen install dir to domain.com/shop

    I followed the instructions in the knowledge base.

    Changed the location of the cache dir to reflect the new path.
    Change the dir names in the config files to the new one.
    Renamed the old dir (store) to (shop)

    When I go to the new location domain.com/shop I get this domain.com/shop/zc_install/index.php

    If I return all the setting back to my old install and rename the (shop) dir back to (store) then Zen works fine again.

    I've also ran the fix_cache_key.php script

    The server is running CentOS/DirectAdmin/SuPHP

    Here are my config files

    PHP Code:
    <?php
    /**
     *
     * @package Configuration Settings
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     */


    /*************** 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.yourdomain.com
      // HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com
      
    define('HTTP_SERVER''http://www.yourdomain.com');
      
    define('HTTPS_SERVER''https://www.yourdomain.com');

      
    // 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''/shop/');
      
    define('DIR_WS_HTTPS_CATALOG''/shop/');

      
    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/shop/
      
    define('DIR_FS_CATALOG''/home/eat_me/domains/yourdomain.com/public_html/shop/');

      
    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''zs');
      
    define('DB_SERVER''localhost');
      
    define('DB_SERVER_USERNAME''eat_me');
      
    define('DB_SERVER_PASSWORD''eat_me');
      
    define('DB_DATABASE''eat_me');
      
    define('USE_PCONNECT''false'); // use persistent connections?
      
    define('STORE_SESSIONS''db'); // use 'db' for best support, or '' for file-based storage

      // 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''none');
      
    define('DIR_FS_SQL_CACHE''/home/eat_me/domains/yourdomain.com.com/public_html/shop/cache');

    ?>
    PHP Code:
    <?php
    //
    /**
     *
     * @package Configuration Settings
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     */


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

    // Define the webserver and path parameters
      // Main webserver: eg, http://localhost - should not be empty for productive servers
      // HTTP_SERVER is your Main webserver: eg, http://www.yourdomain.com
      // HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com
      // HTTP_CATALOG_SERVER is your Main webserver: eg, http://www.yourdomain.com
      // HTTPS_CATALOG_SERVER is your Secure webserver: eg, https://www.yourdomain.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
       */
      
    define('HTTP_SERVER''http://www.yourdomain.com');
      
    define('HTTPS_SERVER''https://www.yourdomain.com');
      
    define('HTTP_CATALOG_SERVER''http://www.yourdomain.com');
      
    define('HTTPS_CATALOG_SERVER''https://www.yourdomain.com');

      
    // Use secure webserver for catalog module and/or admin areas?
      
    define('ENABLE_SSL_CATALOG''false');
      
    define('ENABLE_SSL_ADMIN''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_ADMIN''/shop/admin/');
      
    define('DIR_WS_CATALOG''/shop/');
      
    define('DIR_WS_HTTPS_ADMIN''/shop/admin/');
      
    define('DIR_WS_HTTPS_CATALOG''/shop/');

      
    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)
      //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/shop/
      
    define('DIR_FS_ADMIN''/home/pnwgs/domains/yourdomain.com/public_html/shop/admin/');
      
    define('DIR_FS_CATALOG''/home/pnwgs/domains/yourdomain.com/public_html/shop/');

      
    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''zs');
      
    define('DB_SERVER''localhost');
      
    define('DB_SERVER_USERNAME''eat_me');
      
    define('DB_SERVER_PASSWORD''eat_me');
      
    define('DB_DATABASE''eat_me');
      
    define('USE_PCONNECT''false'); // use persistent connections?
      
    define('STORE_SESSIONS''db'); // use 'db' for best support, or '' for file-based storage

      // 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''none');
      
    define('DIR_FS_SQL_CACHE''/home/eat_me/domains/yourdomain.com/public_html/shop/cache');

    ?>

  2. #2
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Move install dir - having problems

    Quote Originally Posted by evolver View Post
    When I go to the new location domain.com/shop I get this domain.com/shop/zc_install/index.php
    This means that the includes/configure.php file couldn't be found, OR the path created by DIR_FS_CATALOG and your includes folder ... wasn't accessible.

    When you edited the configure.php file contents on your PC and then uploaded it, had you marked the file as writable on the server first? If it's read-only, you won't be able to upload over it.
    .

    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. #3
    Join Date
    Jun 2007
    Posts
    20
    Plugin Contributions
    0

    Default Re: Move install dir - having problems

    Quote Originally Posted by DrByte View Post
    This means that the includes/configure.php file couldn't be found, OR the path created by DIR_FS_CATALOG and your includes folder ... wasn't accessible.

    When you edited the configure.php file contents on your PC and then uploaded it, had you marked the file as writable on the server first? If it's read-only, you won't be able to upload over it.
    Yah I made sure it writeable and the changes were written to the files. I'll have recheck the permissions but if the files can be found once I revert back the chages it means the permissions were intact.

    Thanks

  4. #4
    Join Date
    Jun 2007
    Posts
    20
    Plugin Contributions
    0

    Default Re: Move install dir - having problems

    I must be missing something simple here.

    So my store is located at domain.com/store I'm trying to move it to domain.com/shop

    At my old location I log into admin and to to configure> session and replace store with shop in the path field.

    Then in both config files change all instances of store in the path to shop.

    I upload the files to their correct directories and rename store to shop. I tired both 777,755, 644, 444 for the permissions for the config files. In each instance I still always get the redirect to domain.com/shop/zc_install/index.php

    Now I have Drupal installed in the sites root dir but I don't think this has any side effects on what I'm doing.

    Also if I reverse the whole process and rename all the paths back to store from shop and raname the new shop dir back to store then the script works fine again.

  5. #5
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: Move install dir - having problems

    Those are the steps that I would follow.

    So, unless you have some sort of customization that's overriding normal Zen Cart behavior, or have something configured that's blocking Zen Cart from finding your /includes/configure.php and other folders in the /includes subdirectory, or finding invalid content in your configure.php file, then it should work fine. Those are the only three causes of redirecting to zc_install.

    I would look for .htaccess redirects etc, but these symptoms really don't relate to that.

    You didn't say what version of Zen Cart you're using ... ?

    Try creating a new file named "errors_on.php", and place it in the /includes/extra_configures folder, containing only the following code:
    Code:
    <?php error_reporting(E_ALL);
    After you do that and try to access your /shop URL, what happens ?
    .

    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
    Jun 2007
    Posts
    20
    Plugin Contributions
    0

    Default Re: Move install dir - having problems

    Thanks for the info. I managed to fix the problem. Seems it might have been a FTP client (FileZilla) issue?

    What I did different is instead of re naming the "store" dir to "shop" and then uploading the config files I uploaded the config files first and then re named "store" to "shop". For some reason after that the new location domain.com/shop started to work.

    Go figure.

    Thanks
    Arek


    Quote Originally Posted by DrByte View Post
    Those are the steps that I would follow.

    So, unless you have some sort of customization that's overriding normal Zen Cart behavior, or have something configured that's blocking Zen Cart from finding your /includes/configure.php and other folders in the /includes subdirectory, or finding invalid content in your configure.php file, then it should work fine. Those are the only three causes of redirecting to zc_install.

    I would look for .htaccess redirects etc, but these symptoms really don't relate to that.

    You didn't say what version of Zen Cart you're using ... ?

    Try creating a new file named "errors_on.php", and place it in the /includes/extra_configures folder, containing only the following code:
    Code:
    <?php error_reporting(E_ALL);
    After you do that and try to access your /shop URL, what happens ?

 

 

Similar Threads

  1. Moving cart to root dir. problems
    By xcergy in forum General Questions
    Replies: 11
    Last Post: 12 Feb 2010, 11:29 PM
  2. can't move download dir. out of the web root.
    By quixotic in forum Installing on a Linux/Unix Server
    Replies: 15
    Last Post: 10 Mar 2009, 09:03 AM
  3. Template images pointing to wrong DIR after server move??
    By StarBuck in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 19 Jun 2008, 06:44 PM

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