Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Jan 2016
    Location
    south Florida
    Posts
    7
    Plugin Contributions
    0

    Default After upgrade, Admin page works but main site doesn't (500 err, maint or prog err)

    After upgrade from 1.5.0 to 1.5.4, I am getting a 500 Internal Server Error: states likely causes are 'down for maintenance' or 'program error'. The Admin page works after the upgrade and I was able to turn off Maintenance mode that way, but that change doesn't make the main store website load the site.

    I read as many threads as I could find and could not locate a problem like this, please forgive me if this is answered somewhere else.

    I am helping a friend upgrade his site, so was not involved in original 1.5.0 install (in 2012). Here are the details of where I am so far:
    Site is hosted by DreamHost on a Linux box.
    PHP is version 5.6.10 (Zend 2.6.0)
    MySQL version is 5.6.25
    ZenCart screen shows the four database patch levels 1.5.1 through 1.5.4 all sequentially, each one as a version update from each previous version, which resulted from the zc_install process I ran yesterday, one step at a time as noted in the instructions.

    The original store was set up in the top-level directory so all of the original website folders are subfolders of that top level (mydomain.com).

    I created a new domain with an SSL certificate and copied databases and files from the original store to the new domain structure and set it up exactly as the live store (with the new domain.com and database parameters edited in the configure.php files of course). We determined this new test domain functioned exactly like the live store before proceeding with the upgrade to the test domain.

    The upgraded store website files and folders were copied into a zc_154 folder that was placed at the top level of mydomain.com (meaning /zc_154/ is a subfolder along with the other 1.5.0 subfolders.

    I used WinMerge to compare the two folder structures downloaded to my PC, and updated about 50-55 PHP files, most of which involved adding CEON URI Mapping sections and/or ReCAPTCHA sections found in the 1.5.0 PHP files; some were just custom comments from the original setup, and a couple referenced extra fields that were added as a customization. Tedious but it seemed to go well...WinMerge made it fairly straightforward.

    After running the zc_install upgrade from the /zc_154/zc_install folder (which really just upgraded the database) my attempt to go live was to:
    1. renamed the admin folder as suggested.
    2. renamed the zc_install folder within the /zc_154/ subfolder (for some reason I couldn't delete it).
    3. changed the Dreamhost root folder from mydomain.com to point users at mydomain.com/zc_154/
    4. edited the two configure.php files to incorporate the /zc_154/ pathname in the DIR_FS_CATALOG, DIR_WS_CATALOG, DIR_WS_HTTPS_CATALOG and DIR_FS_SQL_CACHE defines, (and nowhere else) before I copied them up, as part of the WinMerge work.

    After these changes, I was able to log into the Admin tool and confirm I was on the new version. Maintenance was indeed turned On after copying up the edited 1.5.4 program files and pointing Dreamhost to the /zc_154/ folder, and I was able to turn maintenance Off in the Admin tool.

    Attempting to roll back was also unsuccessful, perhaps the original 1.5.0 PHP files don't like the 1.5.4 database structure. I have not yet dumped everything to start over with the original PHP files and 1.5.0 database.

    I think I'm really close, just missing some important fact that someone might recognize. Sure would appreciate a nudge in the right direction.

    This is all being done in a test environment, so no rush (except my friend is breathing down my neck to get fully PCI compliant). Any suggestions would be welcome.

    Regards,
    Brad Martin

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

    Default Re: After upgrade, Admin page works but main site doesn't (500 err, maint or prog err

    Okay. So, would say the issue lies in the file "upgrade" part...
    Doing the database upgrade, one "version" at a time if that what was done is/was unnecessary. The zc_install process applies each update sequentially or as necessary to go from one to the next of each checked box.

    Also, because using CEON URI your .htaccess plays a part...

    So... The reason I say the individual file merge is somewhat an issue is that between ZC 1.5.1 and 1.5.3 there is a significant change in database access.

    Also the above process would assume that each existing plugin is already up-to-date to the latest version of each of those plugins and that those plugins don't have a unique install/set of files for ZC 1.5.4...

    So all that said, it doesn't appear that the process of the following was followed completely. http://www.zen-cart.com/entry.php?3-...d-of-upgrading
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: After upgrade, Admin page works but main site doesn't (500 err, maint or prog err

    Two things spring to my mind:

    1. do you have any entries in the /logs folder? If so, please post them here, bearing in mind that 500 errors are not always logged.

    2. please post the folder location in relation to your domain, eg yourdomain.com/zc_test and then post the content of the configure files (obscure the log in and password entries)

  4. #4
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,904
    Plugin Contributions
    13

    Default Re: After upgrade, Admin page works but main site doesn't (500 err, maint or prog err

    in my experience, if you can get to the admin side but not the customer side, i would look very closely at your includes/configure.php file on the main customer side. in addition, i would agree with mc that the culprit could also be the .htacess file and specifically the CEON URI stuff. really triple check both of those items and if possible turn off the CEON URI and try to clean up the .htaccess files.

    you can look at the network tab in the developer tools (available with chrome and firefox) to see if you hitting redirects which is causing the server error. in which case most likely CEON.

    good luck!
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  5. #5
    Join Date
    Jan 2016
    Location
    south Florida
    Posts
    7
    Plugin Contributions
    0

    Default Re: After upgrade, Admin page works but main site doesn't (500 err, maint or prog err

    frank18:
    1. nothing in Logs folder at all, except (what appear to be) shortcuts for http and https. I have contacted Dreamhost to see if they can provide logs from their side. Waiting on their response
    2a. original store was installed in the root of aquaculturedreefs.com, i.e. the folders cache, docs, downloads, email, extras, includes, renamed admin and the rest are in the root. (I didn't do the original install, and I'm coming into this with no experience at this sort of thing....)
    2b. the 1.5.4 upgrade was copied into another folder off the root, i.e. aquaculturedreefs.com/zc_154/ where the new folders cache, docs, email, extras, includes and renamed admin are located.

    Here are the configure.php files, with the db logins obscured:

    /includes/configure.php -
    <?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 2012-10-01 09:09:50
    */


    /*************** 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://aquaculturedreefs.com');
    define('HTTPS_SERVER', 'https://aquaculturedreefs.com');

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

    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', '/zc_154/');

    // * 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/newreeftown/aquaculturedreefs.com/zc_154/');

    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_');
    define('DB_CHARSET', 'utf8');
    define('DB_SERVER', 'mysql.aquaculturedreefs.com');
    define('DB_SERVER_USERNAME', 'xxxxxxxxxx');
    define('DB_SERVER_PASSWORD', 'xxxxxxxxxxxx');
    define('DB_DATABASE', 'aquacult_zc_db');

    // 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/newreeftown/aquaculturedreefs.com/zc_154/cache');

    // EOF


    /admin/includes/configure.php -
    <?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 2012-10-01 09:31:18
    */


    /*************** 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://aquaculturedreefs.com');
    define('HTTPS_SERVER', 'https://aquaculturedreefs.com');
    define('HTTP_CATALOG_SERVER', 'http://aquaculturedreefs.com');
    define('HTTPS_CATALOG_SERVER', 'https://aquaculturedreefs.com');

    // 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', '/zc_154/');
    define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p2) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
    define('DIR_WS_HTTPS_CATALOG', '/zc_154/');

    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/newreeftown/aquaculturedreefs.com/zc_154/');

    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', 'zen_');
    define('DB_CHARSET', 'utf8');
    define('DB_SERVER', 'mysql.aquaculturedreefs.com');
    define('DB_SERVER_USERNAME', 'xxxxxxxxx');
    define('DB_SERVER_PASSWORD', 'xxxxxxxxxxxx');
    define('DB_DATABASE', 'aquacult_zc_db');

    // 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/newreeftown/aquaculturedreefs.com/zc_154/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

    Thanks for your input frank18
    carl and mc: hoping it's not the CEON URI stuff, if so I have a lot more learning to do. thanks for your assessments.
    Last edited by bradbdivin; 21 Jan 2016 at 02:59 AM.

  6. #6
    Join Date
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,378
    Plugin Contributions
    9

    Default Re: After upgrade, Admin page works but main site doesn't (500 err, maint or prog err

    The 2 configure.php files look ok to me. That would leave the .htaccess file with the CEON directives.

    Was the .htaccess file just copied from the original installation?

    Have you tried to turn CEON URI off in admin?

  7. #7
    Join Date
    Nov 2005
    Location
    los angeles
    Posts
    2,904
    Plugin Contributions
    13

    Default Re: After upgrade, Admin page works but main site doesn't (500 err, maint or prog err

    there will be no logs in the logs folder because the ZC logging function has not loaded before the site fails. in addition, i believe ZC logs php errors, and you have an apache error.

    i'm inclined to agree with frank in that CEON is currently the culprit. i see no redirects happening prior to the 500 error on the site. however it does look like the configures, as frank says, is probably correct. as you can see here:

    http://aquaculturedreefs.com/license.txt

    apache is correctly serving up the right directory.

    i would turn CEON off, and make a backup of you .htaccess file. then load the website and see if the 500 error disappears. i would then add each mod_rewrite rule back 1 at a time to find the culprit. i am hardly an expect at mod-rewrite and i find mastering them to be the black arts!

    i think if you removed the .htaccess file, you will see something completely different.

    in addition, as this is an apache config problem (most probably with the .htaccess file), it is entirely possible your host could provide much more help.

    good luck!
    author of square Webpay.
    mxWorks now has Apple Pay and Google Pay. donations: venmo or paypal accepted.
    premium consistent excellent support. available for hire.

  8. #8
    Join Date
    Jan 2016
    Location
    south Florida
    Posts
    7
    Plugin Contributions
    0

    Default Re: After upgrade, Admin page works but main site doesn't (500 err, maint or prog err

    Quote Originally Posted by frank18 View Post
    The 2 configure.php files look ok to me. That would leave the .htaccess file with the CEON directives.

    Was the .htaccess file just copied from the original installation?

    Have you tried to turn CEON URI off in admin?
    .htaccess files: I unzipped the 1.5.4 install package, modified a number of the new PHP files to include customizations, ReCAPTCHAs and CEON URI mappings from the original installation (using WinMerge), then copied that set of files up to the new /zc_154/ folder structure before running the install from /zc_154/zc_install. Any .htaccess file in that folder structure came with the install set, not the 1.5.0 version. The only files I copied from the original 1.5.0 install were the two configure.php files, which the instructions said I could do.

    Turning off CEON URI in Admin: trying to figure out how to do that this morning, also as mc noted there appears to be an update for that add-on now that I'm looking into it. The controls for CEON are not exactly obvious in the Admin site but I am continuing to research and read posts on it so I expect to get a handle on it shortly.

    Response from Dreamhost that came in last night is they think it was modsecurity getting in the way and that it 'should clear up in a few hours'. Still working with them to get the logs so I can have better information.

    Thanks again to mc, carl and frank for your help with my upgrade issues.

  9. #9
    Join Date
    Jul 2012
    Posts
    16,816
    Plugin Contributions
    17

    Default Re: After upgrade, Admin page works but main site doesn't (500 err, maint or prog err

    Zc has no .htaccess in the root directory, CEON requires one. In the absence of one in the current store root, the .htaccess in the folder "above" it will be used. The "power button" for CEON is under the configuration menu (if properly installed) otherwise you could run a sql command to disable it...

    Also, since no .htaccess was included, then if you goto modules->Ceon URI Mapping (SEO) Config and then the installation check tab and do an installation check then should be presented with a suggested .htaccess file and where to place it...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #10
    Join Date
    Jan 2016
    Location
    south Florida
    Posts
    7
    Plugin Contributions
    0

    Default Re: After upgrade, Admin page works but main site doesn't (500 err, maint or prog err

    OK I think I'm getting this on track.

    CEON was not installed at all, so I've downloaded the new version and added those files into the upgrade folder structure based on the instructions. Looks like the 'modified core files' were part of the original upgrade work I did with WinMerge so I have only a few files left to fix, according to the Installation Check page.

    Because I'm running this new (upgraded) store from a subfolder, and the original store was installed in the root directory, I think there was a conflict (according to DreamHost support that looked at their logs) when I was entering the /zc_154/ subfolder name in the configure.php files. Since I configured the website on the hosting side to use that subfolder, it doesn't seem to be necessary to specify that subpath anywhere in the configure.php files except in the verbose pathnames for DIR_FS_CATALOG and DIR_FS_SQL_CACHE. The admin tool doesn't seem to care either way, but the main website store chokes on the Home button if I specify the subfolder anywhere else in the configure.php file.

    At least now the website comes up, but not how I expected, so I still have work to do when I can get back to this, to finish the CEON add-on and see if anything else isn't working yet.

    Again, many thanks to mc, carlwhat and frank18 for your patient and thoughtful suggestions. Surely do appreciate the help you provided.

    Regards,
    Brad Martin

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 9
    Last Post: 12 Apr 2016, 09:28 PM
  2. Replies: 12
    Last Post: 22 Aug 2011, 05:18 PM
  3. after server upgrade only main page works
    By colemanpa in forum General Questions
    Replies: 2
    Last Post: 12 Sep 2009, 06:01 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