Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2007
    Posts
    143
    Plugin Contributions
    0

    Default configure.php issues

    This one's driving me a bit nuts..

    Live site is 139h, moved from shared hosting to VPS a few months ago. Site is working fine.

    Was troubleshooting an error, couldn't reproduce on xampp local install. Attempting to setup test site on server.

    live site is popular greetings dot com

    test site is pg dot pgsandbox dot come

    They are hosted on same server, but different hosting accounts and different ip addresses.

    When you visit test site, you will notice that images, links, etc are being served from live site - in fact entire site is functioning
    as if it's reading the live site's configure.php. So, i assumed that the configure.php was incorrect, common problem.

    I downloaded the file, only to find it was correct. http and https paths both showed pg dot pgsandbox dot com. To be safe, I logged into cPanel
    File Manager, and changed permissions to 777 on includes/configure.php. Re-uploaded file. Same behavior. When I delete the configure.php
    altogether, zen displays error as expected. This confirms that i'm in the correct directory/account, etc.. However, when I put a bunch of dummy info in the configure.php - and upload to test site, it still
    behaves as if it's reading live site's configure.php.

    have tried downloading the configure.php from test site several times with both ftp and file manager, to ensure that the changes are taking
    effect. For example, right now the test site displays fine, and all the images are served from live site. However, below is the contents of the
    configure.php downloaded directly from test site. Server path and db name/credentials have been purposely
    changed to something incorrect - yet the site still displays and serves images from live site. I don't get it..? where is it getting the reference to the live site? Also, when i attempt to navigate to the admin panel for
    test site, i'm redirected to admin panel for live site. Everything is behaving like it would if I had the wrong configure.php in place,
    but have verified that over and over. Have setup test installations tons of times, so i was assuming i was missing something simple -
    but after a good night's sleep i'm still stumped. Actually just tried again using a different subdomain, nb dot pgsandbox dot com.
    Same results. After fresh install the site loads properly. Once i copy my admin and includes folder,
    then put the configure.php's back, it points to live site. Have also run fix_cache_key.php. Any help would be appreciated.
    Configure.php follows:

    PHP Code:
    <?php
    /**
     * @package Configuration Settings circa 1.3.9
     * @copyright Copyright 2003-2010 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-07-01 11:32:00
     */


    /*************** 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''http://foo-bar.com');
      
    define('HTTPS_SERVER''https://foo-bar.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''/');
      
    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''/home/pgsandbo/public_html/nb/');

      
    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''');
      
    define('DB_SERVER''localhost');
      
    define('DB_SERVER_USERNAME''wrong_on_purpose');
      
    define('DB_SERVER_PASSWORD''blahblah123');
      
    define('DB_DATABASE''wrongagain');
      
    define('USE_PCONNECT''false');
      
    define('STORE_SESSIONS''db');
      
    // for STORE_SESSIONS, 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/pgsandbo/public_html/pg/cache');

    // EOF

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: configure.php issues

    Right off I see
    Code:
      define('DIR_FS_CATALOG', '/home/pgsandbo/public_html/nb/');
    
      define('DIR_FS_SQL_CACHE', '/home/pgsandbo/public_html/pg/cache');
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Oct 2007
    Posts
    143
    Plugin Contributions
    0

    Default Re: configure.php issues

    thanks for the reply, sorry that "nb" was changed after this started, in an attempt to fix.

    just so i'm confident that i've done everything correctly, went thru it one more time:

    installed fresh zen at pg1 dot pgsandbox dot com
    site works correctly, configure.php correctly points to pg1
    renamed includes to includes.old
    renamed admin to admin.old
    uploaded includes and admin (renamed") from live site
    changed permissions on both configures to 777
    copied both configures from "old" folders to new ones
    changed "admin" to new folder name in admin configure
    deleted old folders
    at this point, i start getting the redirect to live site, even before i import the live site db.

    if i take "new" includes folder, and rename it/delete it - then reupload the includes created by fresh install, site works again. when i reverse process and put my "includes" back in, verify that the configure.php has incorrect entries, the site serves/links to my live site. it truly seems as if the configure from live site is being loaded but i have verified 20 times or more that the file loading from pg1 dot pgsandbox dot com / includes / configure.php has no mention of the live site.



    PHP Code:
    <?php
    /**
     * @package Configuration Settings circa 1.3.9
     * @copyright Copyright 2003-2010 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-07-01 02:04:34
     */


    /*************** 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''http://www.notworking.com');
      
    define('HTTPS_SERVER''https://www.notworking.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''/');
      
    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''/home/pgsandbo/public_html/pg1/');

      
    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''');
      
    define('DB_SERVER''localhost');
      
    define('DB_SERVER_USERNAME''wrong');
      
    define('DB_SERVER_PASSWORD''nope');
      
    define('DB_DATABASE''noerror');
      
    define('USE_PCONNECT''false');
      
    define('STORE_SESSIONS''db');
      
    // for STORE_SESSIONS, 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/pgsandbo/public_html/pg1/cache');

    // EOF

  4. #4
    Join Date
    Oct 2007
    Posts
    143
    Plugin Contributions
    0

    Default Re: configure.php issues

    ahhh... mystery solved..

    turns out there was a second version of configure.php that made it's way onto my live site.. (hate it when the little buggers just jump onto your site by themselves) It wasn't causing any conflict because it had the same credentials as the live site's true configure.php... however, when that backup was transferred to test site, it DID cause conflict and zen attempted to obey it instead of the configure.php in the proper location.

    (in my defense I wasn't the one who left the "spare" configure.php, but i guess that's neither here nor there)

    in any event, problem solved just in time to enjoy the holiday weekend.

 

 

Similar Threads

  1. v151 Configure.php / Mailbeez issues
    By LBLJEB in forum General Questions
    Replies: 4
    Last Post: 22 Jun 2014, 04:18 PM
  2. Replies: 9
    Last Post: 1 Sep 2012, 03:13 AM
  3. Configure.php issues
    By megzo487 in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 25 May 2010, 06:01 PM
  4. Can't rename dist-configure.php because there is already a configure.php
    By mamasylvia in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 17 Mar 2008, 06:57 AM

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