Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2012
    Posts
    331
    Plugin Contributions
    0

    Default duplicate configure.php files

    Hello,

    I know there's suppose to be 2 configure.php files

    1. includes/configure.php
    2. admin/includes/configure.php

    However i noticed a 3rd configure.php in:
    admin/configure.php

    I tried deleting it but then my admin gets all messed up, the admin mainpage would work but any links would take me to a page not found page

    where does the configure.php suppose to be ?

  2. #2
    Join Date
    Aug 2012
    Posts
    331
    Plugin Contributions
    0

    Default Re: duplicate configure.php files

    when i hover over a link in the admin i see:

    https://***.com/testsite/admin/ezpages.php

    but when i click on it i'm taken to:

    https://www.***.com/admin/ezpages.php

  3. #3
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: duplicate configure.php files

    There's no configure.php file in /admin. There is a configuration.php file which is necessary and totally different from the configure.php files.

  4. #4
    Join Date
    Aug 2012
    Posts
    331
    Plugin Contributions
    0

    Default Re: duplicate configure.php files

    Quote Originally Posted by stevesh View Post
    There's no configure.php file in /admin. There is a configuration.php file which is necessary and totally different from the configure.php files.
    Thanks, i deleted that one but i have issues with my site admin, the site is on a subfolder called "testsite" when i hover over a link in the admin i see: https://***.com/testsite/admin/ezpages.php but when i click on it i'm taken to: https://www.***.com/admin/ezpages.php

    Here is the contents of admin/includes/configure.php file:
    Code:
    <?php
    /**
     * @package Configuration Settings circa 1.5.0
     * @copyright Copyright 2003-2011 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 2011-12-31 07:46:04
     */
    
    
    /*************** 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', 'https://***.com/testsite');
      define('HTTPS_SERVER', 'https://***.com/testsite');
      define('HTTP_CATALOG_SERVER', 'https://***.com/testsite');
      define('HTTPS_CATALOG_SERVER', 'https://***.com/testsite');
    
      // secure webserver for admin?  Valid choices are 'true' or 'false' (including quotes).
      define('ENABLE_SSL_ADMIN', 'true');
    
      // secure webserver for storefront?  Valid choices are 'true' or 'false' (including quotes).
      define('ENABLE_SSL_CATALOG', 'true');
    
    // 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)
      $t1 = parse_url(HTTP_SERVER);$p1 = $t1['path'];$t2 = parse_url(HTTPS_SERVER);$p2 = $t2['path'];
    
      define('DIR_WS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p1) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
      define('DIR_WS_CATALOG', '/');
      define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p2) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
      define('DIR_WS_HTTPS_CATALOG', '/');
    
      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', 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', '/home/public_html/testsite/');
    
      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_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
      define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS );
      define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
    
    // define our database connection
      define('DB_TYPE', 'mysql');
      define('DB_PREFIX', 'zen_');
      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', 'none'); 
      define('DIR_FS_SQL_CACHE', '/home/public_html/testsite/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

  5. #5
    Join Date
    Aug 2012
    Posts
    331
    Plugin Contributions
    0

    Default Re: duplicate configure.php files


  6. #6
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: duplicate configure.php files

    Quote Originally Posted by ShopVille View Post
    Thanks, i deleted that one but i have issues with my site admin, the site is on a subfolder called "testsite" when i hover over a link in the admin i see: "https://***.com/testsite/admin/ezpages.php" but when i click on it i'm taken to: "https://www.***.com/admin/ezpages.php" ...
    define('HTTP_SERVER', 'https://***.com/testsite'); <-- These should not have directories (folders) in them (or a trailing slash). So should be 'https://***.com'. There are three other similiar entries which need to be updated.

    define('DIR_WS_CATALOG', '/'); <-- This should have the directory (folder) including leading and trailing slash. So should be '/testsite/'. The admin one should calculate automatically once you fix the other settings.

    Note: If you are using shared SSL (different hostname and / or path), please tell us as this impacts a number of things.
    Last edited by lhungil; 14 Oct 2013 at 11:24 PM. Reason: clarification
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  7. #7
    Join Date
    Aug 2012
    Posts
    331
    Plugin Contributions
    0

    Default Re: duplicate configure.php files

    Quote Originally Posted by lhungil View Post
    Note: If you are using shared SSL (different hostname and / or path), please tell us as this impacts a number of things.
    Thanks for the response

    Yes i'm

  8. #8
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: duplicate configure.php files

    Quote Originally Posted by ShopVille View Post
    ... Yes i'm (using a shared SSL)
    This will cause you a few headaches.

    If your URLS are "www.the-domain-i-bought.com/testsite" and "www.shared-server.com/~username/testsite":
    Code:
    /*
     * This is for the admin configure.php
     */
    
      define('HTTP_SERVER', 'https://www.shared-server.com/~username');
      define('HTTPS_SERVER', 'https://www.shared-server.com/~username');
      define('HTTP_CATALOG_SERVER', 'http://www.the-domain-i-bought.com');
      define('HTTPS_CATALOG_SERVER', 'https://www.shared-server.com/~username');
    
      define('ENABLE_SSL_ADMIN', 'true');
      define('ENABLE_SSL_CATALOG', 'true');
    
      define('DIR_WS_CATALOG', '/testsite/');
      define('DIR_WS_HTTPS_CATALOG', '/testsite/');
    The above also assumes both HTTP and HTTPS requests are served from the same physical folder on the server. You would sign into the Zen Cart admin using "https://www.shared-server.com/~username/testsite/myrenamedadminfolder/". There is an great article about configuring Zen Cart for SSL.
    Last edited by lhungil; 15 Oct 2013 at 08:45 PM.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

  9. #9
    Join Date
    Aug 2012
    Posts
    331
    Plugin Contributions
    0

    Default Re: duplicate configure.php files

    Quote Originally Posted by lhungil View Post
    define('HTTP_SERVER', 'https://***.com/testsite'); <-- These should not have directories (folders) in them (or a trailing slash). So should be 'https://***.com'. There are three other similiar entries which need to be updated.

    define('DIR_WS_CATALOG', '/'); <-- This should have the directory (folder) including leading and trailing slash. So should be '/testsite/'. The admin one should calculate automatically once you fix the other settings.

    Note: If you are using shared SSL (different hostname and / or path), please tell us as this impacts a number of things.
    Is this for both configure.php files? i noticed that whatever link (catergory ezpages etc,) i click in the the main page loads but the url in the browser bar is the correct one

  10. #10
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: duplicate configure.php files

    The "store" configure.php
    This contains settings for the pages the general public can see. It is also refereed to by other names such as the "storefront" or "CATALOG" side of the store.

    The "admin" configure.php
    This contains settings for both the administrative side of the store and also the catalog side of the store.


    So yes it is best to use the same settings in both places for corresponding entries. For example: 'HTTP_CATALOG_SERVER' in the "admin" configure.php should be the same as 'HTTP_SERVER' in the "store" configure.php.

    You can read more about the configure.php and keep in mind most entries with 'CATALOG' in the "admin" configure.php are for the "storefront" (some parts of the "admin" such the define editor needs to know where the CATALOG files are located).
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

 

 

Similar Threads

  1. messed up my configure.php files
    By shanesoine in forum General Questions
    Replies: 3
    Last Post: 12 Apr 2011, 01:00 AM
  2. configure.php files
    By slater555 in forum General Questions
    Replies: 1
    Last Post: 1 Mar 2011, 10:02 PM
  3. I'm stuck! Configure.php files
    By countingsheep in forum Basic Configuration
    Replies: 6
    Last Post: 6 Sep 2007, 09:17 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