Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Jul 2009
    Posts
    103
    Plugin Contributions
    0

    Default Live site flip/flops into maintenance mode

    Hi everyone

    I am a long time user of Zen Cart and am quite clued up on using it and we haven't had any issues for the last 12 months. However, since I upgraded our site from 1.3.8 to 1.3.9h a few days ago, a really strange problem is occurring.

    The site is live and works beautifully and then suddenly it flips into maintenance mode (NOTE: admin has not set it to maintenance mode).

    Thinking that perhaps the database was not connecting for some reason (mySql down etc..) I checked but this is not the case as I am also logged in to Admin and the database connection is fine plus I checked in phpAdmin and cPanel that the databse server is up.

    There is no pattern to it that I can discern yet, it happens randonly and then just as randomly fixes itself...

    Is there anyone can think of a reason for this - is it perhaps a bug in 1.3.9h or something else that needs to be set in setup?

    FYI there are no error logs in /cache

    Cheers

    a perplexed Cliff

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

    Default Re: Live site flip/flops into maintenance mode

    During the upgrade did you touch/edit the configure.php files in any way?
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jul 2009
    Posts
    103
    Plugin Contributions
    0

    Default Re: Live site flip/flops into maintenance mode

    Hey Kobra

    Thanks for getting back to me - yes, I did edit them because:

    1. I wanted to move the site to a new domain and the upgrade was a good time to do this;
    2. I copied the database and the system to the new domain then did the upgrade on the new domain and copy database (exact copy of the live database);
    3. Once I was happy it was all fine, the test system was made to a live system on the new domain;

    I enclose a copy of my config files (sensitive info removed)

    Hope this helps.. It all seems right to me, and when it works it works perfectly! AS I say, the maintenance thing is completely random - I was in the middle of a checkout now when it came up into maintenance mode.. hilarious but annoying!

    Cheers

    Cliff

    PHP Code:
    <?php
    /**
     * dist-configure.php
     *
     * @package Configuration Settings
     * @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: dist-configure.php 6329 2007-05-16 15:36:56Z drbyte $
     * @private
     */
    // 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://mydomain.co.uk');
    define('HTTPS_SERVER''https://mydomain.co.uk');

    // Use secure webserver for checkout procedure?
    define('ENABLE_SSL''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)
    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''/phpBB2/');

    // * 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/xxx/mydomain.co.uk/');

    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''zen_'); // prefix for database table names -- preferred to be left empty
    define('DB_SERVER''localhost');
    define('DB_SERVER_USERNAME''xxx_xxx');
    define('DB_SERVER_PASSWORD''xxpasswordxx');
    define('DB_DATABASE''xxx_xxx');
    define('USE_PCONNECT''false');
    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''file');
    define('DIR_FS_SQL_CACHE''/home/xxx/tmp/zencache');

    ?>
    and the admin one:

    PHP Code:
    <?php
    /**
     * @package Configuration Settings circa 1.3.8
     * @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
     */


    /*************** 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.      ***********/

    // 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
       *
       * If you desire your *entire* admin to be SSL-protected, make sure you use a "https:" URL for all 4 of the following:
       */
      
    define('HTTP_SERVER''http://mydomain.co.uk');
      
    define('HTTPS_SERVER''https://mydomain.co.uk');
      
    define('HTTP_CATALOG_SERVER''http://mydomain.co.uk');
      
    define('HTTPS_CATALOG_SERVER''https://mydomain.co.uk');

      
    // Use secure webserver for catalog module and/or admin areas?
      
    define('ENABLE_SSL_CATALOG''true');
      
    define('ENABLE_SSL_ADMIN''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)
      
    define('DIR_WS_ADMIN''/1_ret_56_a/');
      
    define('DIR_WS_CATALOG''/');
      
    define('DIR_WS_HTTPS_ADMIN''/1_ret_56_a/');
      
    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)
      //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
      
    define('DIR_FS_ADMIN''/home/xxxx/mydomain.co.uk/1_ret_56_a/');
      
    define('DIR_FS_CATALOG''/home/xxxx/mydomain.co.uk/');

      
    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''/home/xxxx/secure/downloads/');

    // define our database connection
      
    define('DB_TYPE''mysql');
      
    define('DB_PREFIX''zen_');
      
    define('DB_SERVER''localhost');
      
    define('DB_SERVER_USERNAME''xxx_xxx');
      
    define('DB_SERVER_PASSWORD''xxpasswordxx');
      
    define('DB_DATABASE''xxx_xxx');
      
    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/xxx/mydomain.co.uk/cache');

    // EOF

  4. #4
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Live site flip/flops into maintenance mode

    2. I copied the database and the system to the new domain then did the upgrade on the new domain and copy database (exact copy of the live database);

    When you say you 'copied' the database, does that mean you Imported it to the new domain?


    3. Once I was happy it was all fine, the test system was made to a live system on the new domain;

    How was the test system made into a live system? Are we talking two different servers, hosting accounts or ???

  5. #5
    Join Date
    Jul 2009
    Posts
    103
    Plugin Contributions
    0

    Default Re: Live site flip/flops into maintenance mode

    OK, if you want it step by step, here it is:

    1. Copy all files from domain xyz.com to NEW domain abc.com
    2. Export full database using phpMyAdmin from xyz.com and imported into new database abc.com
    3. Follow 1.3.9h upgrade procedure, including using WinMerge to detect all changes from the original 1.3.8 installation
    4. Change configure.php files to point to new server abc.com and new database user/name
    5. Set up PayPal and other payment methods again on abc.com and ensure that they work - PASS
    6. Test rest of abc.com in 1.3.9h and ensure that all products and checkout work fine, including customer accounts etc - PASS
    7. Make all cosmetic changes as per old xyz.com and apply to abc.com and test - PASS

    Hope that explains it better. If you'd like to go to the site, let me send it to you privately - I don't like putting it in here as google searches pick up these postings and customers will find my posts..

    Cheers

    Cliff

  6. #6
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Live site flip/flops into maintenance mode

    You have at least a couple of errorsmis-matches in the configs but I am not sure that this would cause the maintenance mode thing
    Code:
      define('DIR_FS_SQL_CACHE', '/home/xxx/tmp/zencache');
      define('DIR_FS_SQL_CACHE', '/home/xxx/mydomain.co.uk/cache');
    
      define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
      define('DIR_FS_DOWNLOAD', '/home/xxxx/secure/downloads/');
    Zen-Venom Get Bitten

  7. #7
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Live site flip/flops into maintenance mode

    Cliff, I did receive your PM but I don't create test account login on other sites.

    The thing about coding is that one must be exact, in their code and description of code. I asked the questions I did because the wording used was vague and not exact. Coping is not the same as Importing for example. The items brought up by kobra are valid as well, although, it can be confusing as some Hosters require the Domain name in the Hosting account path but the majority do not. Also, one can leave out confidential information such as dir. name for the Admin which you will have to change if it is as shown in the config file posted.

    The config files do look correct and the only other thing I can think of is whether or not you are using the default settings for:

    Admin > Configuration > Sessions

    Were they changed?

  8. #8
    Join Date
    Jul 2009
    Posts
    103
    Plugin Contributions
    0

    Default Re: Live site flip/flops into maintenance mode

    Dear Rob

    Thanks for the valid points that you make. Stupid of me to post my admin directory but I guess the good thing is that I always have my admin directory protected by .htaccess passwords - pheww..

    I hadn't changed Admin > Configuration > Sessions at all but I checked the cache sessions directory in admin and it was pointing to a non-existent directory so have changed that to the same one in the configure.php file and we'll see if it makes any difference - screen shot below - does it all look ok to you?


    Thanks for your valued input in any case.

    Cheers

    Cliff

  9. #9
    Join Date
    Oct 2006
    Location
    Alberta, Canada
    Posts
    4,571
    Plugin Contributions
    1

    Default Re: Live site flip/flops into maintenance mode

    IP to Host Conversion Status : true

    Yours shows "false" so that has been changed.

    The two final settings are not default Zen Cart so not sure where they came from nor what they should be.

  10. #10
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Live site flip/flops into maintenance mode

    The last two are set to the defaults
    Zen-Venom Get Bitten

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Product downloads don't work when the site's in maintenance mode
    By lat9 in forum Setting Up Categories, Products, Attributes
    Replies: 10
    Last Post: 20 Oct 2012, 03:59 PM
  2. Unable to take site out of maintenance mode
    By neit in forum General Questions
    Replies: 3
    Last Post: 31 Jan 2011, 01:32 PM
  3. SITE DOWN - maintenance mode works
    By Stuff4Toys in forum General Questions
    Replies: 4
    Last Post: 27 Dec 2007, 08:02 PM

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