Results 1 to 8 of 8
  1. #1
    Join Date
    Aug 2007
    Location
    Williston, Vermont
    Posts
    182
    Plugin Contributions
    1

    Default Admin bouncing to login - session problem?

    On my site under admin I can log in, but I frequently get bounced back to the login screen.

    At first I thought this was perhaps a super-orders 3 issue because it would happen when I hit the 'search' button, but I noticed a difference between my development site and my released site that makes me think this is a more general issue.

    After searching and following similar threads, I suspect something's wrong with my sessions but I'm having trouble tracking it down. Some data points:

    Released site:
    • Bluehost
    • PHP 5.2
    • ZC 1.5.1
    • Every page URL includes &zenAdminID=... in the URL address bar
    • Occasionally bounces back to login screen with a new session ID showing in the URL bar


    Development site:
    • xampp
    • PHP 5.4.4
    • ZC 1.5.1
    • URL bar does not show &zenAdminID=... and doesn't bounce back to login


    I verified that the sessions are getting stored to the zen_sessions table (the config file specifies 'database' for SQL_CACHE_METHOD). I've also switched this to 'file' with no effect.

    I've cleared caches and cookies and tried different browsers.

    I switched the released site to PHP 5.4 (via cpanel), but now I get immediately bounced back to the login screen (with a new sessionID showing in the URL)

    I don't see anything in the main webserver log or in the cache directory logs.

    Any suggestions?

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,970
    Plugin Contributions
    96

    Default Re: Admin bouncing to login - session problem?

    Quote Originally Posted by carlvt88 View Post
    ...
    I don't see anything in the main webserver log or in the cache directory logs.

    Any suggestions?
    For Zen Cart v1.5.1, the debug log files are now located in the /logs directory; try checking there.

  3. #3
    Join Date
    Aug 2007
    Location
    Williston, Vermont
    Posts
    182
    Plugin Contributions
    1

    Default Re: Admin bouncing to login - session problem?

    Thanks for that, I checked but that directory's empty (except for a single log a couple of months ago)

    Other thoughts?

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Admin bouncing to login - session problem?

    Can you do anything in the Admin without being taken back to the login screen?

    If so, where are you when you get tossed back to the login screen?

    If you are in one place where this happens ...

    Do you *always* get tossed back to the login page? Or just sometimes?


    If you have this happen from several places, where do it happen most often?


    You mentioned that the zenAdminID follows you around ... has it *always* followed you around in the Admin?

    Is your Admin *always* SSL or just when logging in?


    Try to avoid you actually posting your answer, but if you can compare from your:
    /your_secret_admin/includes/configure.php

    to what is in your Configuration ... Sessions ... does the
    Session Directory

    match what is in your configure.php file?

    Does that also match what is in your:
    /includes/configure.php

    for your Store?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Aug 2007
    Location
    Williston, Vermont
    Posts
    182
    Plugin Contributions
    1

    Default Re: Admin bouncing to login - session problem?

    Can you do anything in the Admin without being taken back to the login screen?

    If so, where are you when you get tossed back to the login screen?

    If you are in one place where this happens ...

    Do you *always* get tossed back to the login page? Or just sometimes?

    If you have this happen from several places, where do it happen most often?
    Yes - for the most part, things work well. I can repeatedly reproduce the jump to login when I hit one of the search / submit buttons on one of the superOrders pages (example, fill in the criteria and hit search). I was on the fence on whether to post in the plugins sections or as a general question because of the way the URL shows the zenAdminID on each page - and in the url the session number changes when I jump to login. Since I don't have that on my local system, I was leaning to some issue with sessions.

    You mentioned that the zenAdminID follows you around ... has it *always* followed you around in the Admin?

    Is your Admin *always* SSL or just when logging in?
    I don't think the zenAdminID has ever shown in the URL - but, I can't say that for certain. I do know it doesn't show on my xampp system which is working correctly. I've also disabled SSL for all admin for the purposes of debugging this.

    Try to avoid you actually posting your answer, but if you can compare from your:
    /your_secret_admin/includes/configure.php

    to what is in your Configuration ... Sessions ... does the
    Session Directory

    match what is in your configure.php file?

    Does that also match what is in your:
    /includes/configure.php

    for your Store?
    Dang - I thought you found it - it *was* pointing to my old account name (recently transferred site to new account name). But, I realigned all three places (two configure.php's and the Session Directory), cleared browser cache, and I still see the zenAdminID in the URL and get the login bounce. I also don't see any files getting written to this directory. I have permissions 777 on this directory - am I missing something else to get the sessions to write there?

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Admin bouncing to login - session problem?

    On the forms there is a security token that has to be sent and without it, you will have to login ...

    While I could be off on this ... 10 to 1 the super orders you are using is not up to date with the security token ...

    See if the support thread either talks about this or if there is a newer version available for you ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7
    Join Date
    Aug 2007
    Location
    Williston, Vermont
    Posts
    182
    Plugin Contributions
    1

    Default Re: Admin bouncing to login - session problem?

    Finally found it - Long story short there was an issue in my configure.php file. When I moved from a subdomain to a primary domain, my subdirectory redirection wasn't working the same (no wildcards on the primary domain).

    This meant changing my server and directory definitions, where subdir is a parent directory to the catalog.

    Code:
      define('HTTP_SERVER', 'http://www.domainname.com/subdir');
      define('HTTPS_SERVER', 'https://secure.bluehost.com/~myname/subdir');
      define('HTTP_CATALOG_SERVER', 'http://www.domainname.com/subdir');
      define('HTTPS_CATALOG_SERVER', 'https://secure.bluehost.com/~myname/subdir');
    
      define('DIR_WS_ADMIN', '/zencartdirectory/admin/');
      define('DIR_WS_CATALOG', '/zencartdirectory/');

  8. #8
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: Admin bouncing to login - session problem?

    Quote Originally Posted by carlvt88 View Post
    Finally found it - Long story short there was an issue in my configure.php file. When I moved from a subdomain to a primary domain, my subdirectory redirection wasn't working the same (no wildcards on the primary domain).

    This meant changing my server and directory definitions, where subdir is a parent directory to the catalog.

    Code:
      define('HTTP_SERVER', 'http://www.domainname.com/subdir');
      define('HTTPS_SERVER', 'https://secure.bluehost.com/~myname/subdir');
      define('HTTP_CATALOG_SERVER', 'http://www.domainname.com/subdir');
      define('HTTPS_CATALOG_SERVER', 'https://secure.bluehost.com/~myname/subdir');
    
      define('DIR_WS_ADMIN', '/zencartdirectory/admin/');
      define('DIR_WS_CATALOG', '/zencartdirectory/');
    That would definitely be a primary contributor to the zenAdminID problem.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. v151 I keep bouncing to the admin Login page
    By GregC in forum Basic Configuration
    Replies: 2
    Last Post: 4 Dec 2013, 04:24 AM
  2. Admin Login, Bouncing back to login screen
    By KT Naturals in forum General Questions
    Replies: 3
    Last Post: 10 Jul 2011, 08:07 PM
  3. Bouncing to Admin Home
    By ideasgirl in forum General Questions
    Replies: 7
    Last Post: 17 Jul 2009, 02:30 AM
  4. Problem with old customer login/session??
    By divinelighting in forum General Questions
    Replies: 6
    Last Post: 24 Apr 2008, 08:22 PM
  5. Admin and Session problem
    By dadomingues in forum General Questions
    Replies: 3
    Last Post: 29 Mar 2007, 03:24 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