Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2007
    Location
    Denver, Colorado
    Posts
    14
    Plugin Contributions
    0

    Default Admin Login Issue - 1.3.7.1 and old version of PHP: 4.3.2

    So I've completed new install and having same issue logging in the Admin Panel. I'm running 1.3.7.1 and PHP 4.3.2.

    For us novices with PHP can you give us a line number or even better yet a before snippet of code and after snippet of code?

    The Highlands Group



    Quote Originally Posted by beerdawg View Post
    It seems that logging into the admin pages with zen-cart-1.3.7.1 using PHP-4.3.2 is broken. After entering the correct login/passwd, it will just return back to the login page.

    The issue has to do with the call to session_regenerate_id() from zen_session_recreate() in includes/functions/sessions.php (which is called from admin/login.php).

    According to the php documentation for php, "Version 4.3.3: Since then, if session cookies are enabled, use of session_regenerate_id() will also submit a new session cookie with the new session id." See the documentation here:

    That means that 4.3.2 does not submit a new session cookie with the new session id.

    The fix provided by buraks78 in the comments in the link above seems to address the issue and fix the zen-cart login to the admin page.

    Basically, add this directly after the call to session_regenerate_id() in includes/functions/sessions.php:

    Code:
      if(!version_compare(phpversion(),"4.3.3",">=")){
         setcookie(
            session_name(),
            session_id(),
            ini_get("session.cookie_lifetime"),
            "/"
         );
      }
    Herb.
    Gene Fourney
    The Highlands Group
    1435 Larimer St.
    Denver, CO 80202
    (303) 346-2255
    www.thehighlandsgroup.us

  2. #2
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Admin Login Issue - 1.3.7.1 and PHP 4.3.2

    So I've completed new install and having same issue logging in the Admin Panel. I'm running 1.3.7.1 and PHP 4.3.2.
    Why install 1.3.7.1 when latest version 1.3.8.a would undoubtedly fix
    your problem?

  3. #3
    Join Date
    Jul 2007
    Location
    Denver, Colorado
    Posts
    14
    Plugin Contributions
    0

    Default Re: Admin Login Issue - 1.3.7.1 and PHP 4.3.2

    Sorry. My mistake. Version is 1.3.8a. So problem exists with latest version.
    Gene Fourney
    The Highlands Group
    1435 Larimer St.
    Denver, CO 80202
    (303) 346-2255
    www.thehighlandsgroup.us

  4. #4
    Join Date
    Jul 2007
    Location
    Denver, Colorado
    Posts
    14
    Plugin Contributions
    0

    Default Re: Admin Login Issue - 1.3.8a and PHP 4.3.2

    I have run new password script to log into Admin section and changed password in backend. This is a fresh install. I am able to login successfully using Firefox browser but not IE 6.0. I've cleared cache, cookies and history in IE. I also went to cookie files and deleted. Firefox works and I can work in admin area but can't in IE?

    What gives?
    Gene Fourney
    The Highlands Group
    1435 Larimer St.
    Denver, CO 80202
    (303) 346-2255
    www.thehighlandsgroup.us

  5. #5
    Join Date
    Jul 2007
    Location
    Denver, Colorado
    Posts
    14
    Plugin Contributions
    0

    Default Re: Admin Login Issue - 1.3.7.1 and PHP 4.3.2

    As a matter of courtesy to other Zenners - I was able to resolve the issue on my own.

    I added the code in the posting above where there are not 1 but 4 instances directly after the call to session_regenerate_id() in includes/functions/sessions.php file.

    I rebooted computer, cleared cookies and files from IE and FF browsers. Cleared files in cache on server and voila it worked.
    Gene Fourney
    The Highlands Group
    1435 Larimer St.
    Denver, CO 80202
    (303) 346-2255
    www.thehighlandsgroup.us

 

 

Similar Threads

  1. Replies: 4
    Last Post: 29 May 2016, 03:32 PM
  2. v138a The PHP version you are using (4.4.9) is too old
    By earmsby in forum Upgrading to 1.5.x
    Replies: 4
    Last Post: 14 Sep 2012, 09:39 PM
  3. PHP 5.3 Fixing with old version... Problems...
    By kevie192 in forum General Questions
    Replies: 55
    Last Post: 18 Jul 2010, 08:28 PM
  4. sessions.php issue. cant login to admin? PHP 5.2.0
    By Slashdot in forum General Questions
    Replies: 9
    Last Post: 30 Nov 2006, 12:44 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