Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Apr 2007
    Posts
    47
    Plugin Contributions
    0

    Default Fatal error during admin login

    I had to re-install zencart from a backup, but when I go to the admin area now, I am getting the following error:

    Fatal error: Call to undefined function whos_online_session_recreate() in /home/accountname/public_html/zencart/includes/functions/sessions.php on line 171
    Does anyone have a suggestion on how to resolve this?

    Thanks.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Fatal error during admin login

    How old is your backup?

    Your /includes/functions/whos_online.php file is missing stuff ...
    .

    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.

  3. #3
    Join Date
    Apr 2007
    Posts
    47
    Plugin Contributions
    0

    Default Re: Fatal error during admin login

    Thank you. It's about a week old.

    Is there any way to recover from this?

    Meeven

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Fatal error during admin login

    Quote Originally Posted by meeven View Post
    It's about a week old.

    Is there any way to recover from this?
    Let's think about this logically ...
    1. Why did you do this restore anyway?
    2. What have you changed in the last week?
    3. It would make sense to re-do those changes.
    4. And make sure the file I mentioned actually exists and is complete.
    Many times when uploading files there will be timeouts and incomplete uploads.

    I'm not sure how you did your restore, but if you simply uploaded the files, then you may be victim of incomplete uploads.
    .

    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.

  5. #5
    Join Date
    Apr 2007
    Posts
    47
    Plugin Contributions
    0

    Default Re: Fatal error during admin login

    Thanks again

    The reason I did the restore is that I got caught in a rather convoluted situation. I was trying to install Harslade's book product type, so I took a backup of the install files and the db before attempting it. The book product type install didn't go too well, so I cleaned out the whole install and untarred the backup file into the subdomain. However, Zencart went through the whole install routine again instead of reverting to the old install, so I dropped the tables and imported the old db backup.

    When I went to the site and typed in the url, I saw an error about the application_top.php and realised that, when zipping the files for backup, I had inadvertently left out the includes and media directories. So, I uploaded those directories into the existing install and got the site back, but not the admin area.

    This is where I stand now:
    1.) Old install restored along with old db
    2.) Book product type files uploaded (sql patch still to be done)
    3.) Site is up, but admin area throws the error.

    Hope this makes sense.

    Meeven.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Fatal error during admin login

    edit your /includes/functions/sessions.php file.

    Around line 157 you'll see this:
    Code:
      function zen_session_recreate() {
        global $http_domain, $https_domain, $current_domain;
          if ($http_domain == $https_domain) {
          $saveSession = $_SESSION;
          $oldSessID = session_id();
          session_regenerate_id();
          $newSessID = session_id();
          session_id($oldSessID);
          session_id($newSessID);
          if (STORE_SESSIONS == 'db') {
            session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc');
          }
          session_start();
          $_SESSION = $saveSession;
          whos_online_session_recreate($oldSessID, $newSessID);
        } else {
    change it to this:
    Code:
      function zen_session_recreate() {
        global $http_domain, $https_domain, $current_domain;
          if ($http_domain == $https_domain) {
          $saveSession = $_SESSION;
          $oldSessID = session_id();
          session_regenerate_id();
          $newSessID = session_id();
          session_id($oldSessID);
          session_id($newSessID);
          if (STORE_SESSIONS == 'db') {
            session_set_save_handler('_sess_open', '_sess_close', '_sess_read', '_sess_write', '_sess_destroy', '_sess_gc');
          }
          session_start();
          $_SESSION = $saveSession;
          if (IS_ADMIN_FLAG !== true) {
            whos_online_session_recreate($oldSessID, $newSessID);
          }
        } else {

    NOTE: IF THIS HELPS YOU, YOU NEED TO UPGRADE YOUR SITE TO THE CURRENT VERSION !!!!!!!!!!!!
    .

    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.

  7. #7
    Join Date
    Apr 2007
    Posts
    47
    Plugin Contributions
    0

    Default Re: Fatal error during admin login

    Wonderful, thank you.

    I am going to try this right away.

  8. #8
    Join Date
    Apr 2007
    Posts
    47
    Plugin Contributions
    0

    Default Re: Fatal error during admin login

    Problem solved. Thank you very much.

  9. #9
    Join Date
    Oct 2007
    Posts
    8
    Plugin Contributions
    0

    Default Re: Fatal error during admin login

    Having the same issue after a server hack (IX Webhosting). Trying to get the site up and running on a new server from my backups.

    The new site is located at http://shop2.lisasdesigns.net

    When I change the code like above, the error message goes away, but when I try to log in, it doesn't do anything.

    Any help would be greatly appreciated!

  10. #10
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Fatal error during admin login

    Quote Originally Posted by hamburgler100 View Post
    Having the same issue after a server hack
    You said "having the same issue" ... are you referring to "undefined funciton whos_online_session_recreate()" ? or just being unable to login to your admin?
    Quote Originally Posted by meeven View Post
    I had to re-install zencart from a backup, but when I go to the admin area now, I am getting the following error:

    Fatal error: Call to undefined function whos_online_session_recreate() in /home/accountname/public_html/zencart/includes/functions/sessions.php on line 171
    Does anyone have a suggestion on how to resolve this?

    Thanks.
    .

    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.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Fatal error: admin login line 72
    By cldflschr in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 24 Oct 2010, 03:06 PM
  2. Fatal Error on Admin Login Attempt
    By tishost in forum General Questions
    Replies: 2
    Last Post: 30 Jul 2008, 07:14 PM
  3. Fatal error can't login to admin
    By scubasteve in forum General Questions
    Replies: 1
    Last Post: 4 Jun 2008, 03:35 AM
  4. Fatal Error : Admin Login
    By globeriding in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 10 Dec 2007, 10:47 AM
  5. Fatal error - admin login problem
    By scot_giant in forum General Questions
    Replies: 2
    Last Post: 6 Oct 2007, 05:13 AM

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