Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Jul 2006
    Posts
    12
    Plugin Contributions
    0

    Default Can't login to admin after upgrade; can login with new install

    I can't seem to figure this one out. I have done tons of searching, read all the docs, checked the error logs, etc..

    I am upgrading from 1.3.8a to 1.5.1. When I do an upgrade (using either my old configure.php files, modified and renamed dist-configure.php files, or modified configure.php files created by a clean install), I am unable to log in to admin. I get the login screen, the spinning wheel after entering my login info, and then a fresh login screen. I think I have ruled out id/password issues.

    On the other hand, when I do an install with a new database, everything works fine.

    I think I have tried enough variations to have ruled out any problems with configure.php. I also have used different browswers, cleared cache/cookies, etc. Because it works on a fresh install, it seems like the problem has to be with the upgraded database.

    If I could just transfer over my customer and order data, I could live with rebuilding everything else.. but it seems like that would be a nightmare.

    Any help would be greatly appreciated.

  2. #2
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Can't login to admin after upgrade; can login with new install

    Have you run the database upgrade utility alone on the old db? Were there any errors reported?
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base7 with Wholesale PRO - 88 preinstalled plugins zero errors.

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: Can't login to admin after upgrade; can login with new install

    Within your admin's /includes/configure.php file, what's the setting for
    Code:
      define('SQL_CACHE_METHOD', 'none');
    If it's set to something other than 'none', set it to 'none'.

  4. #4
    Join Date
    Jul 2006
    Posts
    12
    Plugin Contributions
    0

    Default Re: Can't login to admin after upgrade; can login with new install

    Thanks for the quick replies. My define('SQL_CACHE_METHOD', 'none') was already set to 'none. Here is an error I got during upgrade; I admittedly didn't give it the attention it likely deserved:

    NOTE: Skipped upgrade statements: 4
    See details at bottom of page for your inspection.
    (Details also logged in the "upgrade_exceptions" table.)
    Note: In most cases, these failed statements can be ignored,
    as they are indications that certain settings may have already been set on your site.
    If all the suggested upgrade steps have been completed (no recommendations left),
    you may proceed to Skip Upgrades and continue configuring your site.

    SKIPPED: Cannot drop index page_accessed on table admin_activity_log because it does not exist.
    SKIPPED: Cannot drop index access_date on table admin_activity_log because it does not exist.
    SKIPPED: Cannot add index idx_page_accessed_zen to table admin_activity_log because it already exists.
    SKIPPED: Cannot add index idx_access_date_zen to table admin_activity_log because it already exists.

  5. #5
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: Can't login to admin after upgrade; can login with new install

    Those skipped statements look harmless.

    Do you have access to the phpMyAdmin for your database? Click on the configuration table and then search for the configuration_key named SESSION_WRITE_DIRECTORY. The value in that item should be the same value as DIR_FS_SQL_CACHE in your configure.php files.

  6. #6
    Join Date
    Jul 2006
    Posts
    12
    Plugin Contributions
    0

    Default Re: Can't login to admin after upgrade; can login with new install

    Thanks. It turns out that the value in the database was a nonexistent folder, but I don't think it mattered because DIR_FS_SQL_CACHE was set to 'none' in the configuration.php files -- plus, it is also set to that nonexistent folder in my live site that has worked for many years. Just to try, I set the database value to a real directory (with chmod 666), and changed it to 'file' in my config files. No change.


    Quote Originally Posted by lat9 View Post
    Those skipped statements look harmless.

    Do you have access to the phpMyAdmin for your database? Click on the configuration table and then search for the configuration_key named SESSION_WRITE_DIRECTORY. The value in that item should be the same value as DIR_FS_SQL_CACHE in your configure.php files.

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: Can't login to admin after upgrade; can login with new install

    Would you post your /admin/includes/configure.php file's contents? Make sure to xxxx-out the database-related information and any admin-directory name that might be present.

  8. #8
    Join Date
    Jul 2006
    Posts
    12
    Plugin Contributions
    0

    Default Re: Can't login to admin after upgrade; can login with new install

    Quote Originally Posted by lat9 View Post
    Would you post your /admin/includes/configure.php file's contents? Make sure to xxxx-out the database-related information and any admin-directory name that might be present.
    Here you go. Thanks again.

    <?php
    /**
    * @package Configuration Settings circa 1.5.1
    * @copyright Copyright 2003-2012 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 2013-12-27 10:26:13
    */


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

    // secure webserver for admin? Valid choices are 'true' or 'false' (including quotes).
    define('ENABLE_SSL_ADMIN', 'false');

    // secure webserver for storefront? Valid choices are 'true' or 'false' (including quotes).
    define('ENABLE_SSL_CATALOG', '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)
    $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', '/yyyy/');
    define('DIR_WS_HTTPS_ADMIN', preg_replace('#^' . str_replace('-', '\-', $p2) . '#', '', dirname($_SERVER['SCRIPT_NAME'])) . '/');
    define('DIR_WS_HTTPS_CATALOG', '/yyyy/');

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

    //the following path is a COMPLETE path to the /logs/ folder eg: /var/www/vhost/accountname/public_html/store/logs ... and no trailing slash
    define('DIR_FS_LOGS', '/home/----/public_html/yyyy/logs');

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

  9. #9
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: Can't login to admin after upgrade; can login with new install

    The configure.php file looks just fine. When you "arrive" at your admin's login screen, do you get a zenAdminID $_GET variable? Is that variable still there after the aborted login attempt? Is the variable's value the same as it was upon arrival?

    Who are you hosted by?

  10. #10
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: Can't login to admin after upgrade; can login with new install

    You might also check your database Configuration->Sessions settings for anything that is non-default. The default values for ZC 1.5.1 are:
    Code:
    Session Directory 	{DIR_FS_SQL_CACHE}	 
    Cookie Domain 	True 	
    Force Cookie Use 	False 	
    Check SSL Session ID 	False 	
    Check User Agent 	False 	
    Check IP Address 	False 	
    Prevent Spider Sessions 	True 	
    Recreate Session 	True 	
    IP to Host Conversion Status 	true 	
    Use root path for cookie path 	False 	
    Add period prefix to cookie domain 	True
    You can view these values using phpMyAdmin, too. Click on your configuration table, then click the Search tab and search for configuration_group_id value of 15.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v150 Customer can't login after new install
    By jbrintnell in forum Installing on a Windows Server
    Replies: 5
    Last Post: 20 May 2013, 07:15 PM
  2. Can't Login to Admin after install
    By CerysCrow in forum Installing on a Linux/Unix Server
    Replies: 6
    Last Post: 8 Jan 2009, 08:11 PM
  3. Can't Login To Admin CP After Install
    By Beegolof in forum Basic Configuration
    Replies: 0
    Last Post: 23 Mar 2007, 11: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