Session log me out

Username (e.g. epiz_XXX) or Website URL

epiz_26137551

Error Message

Other Information

I use opencart.The admin panel session is too short.always log me out.I want to increase the time session for opencart admin.

no you can’t
Or you can use “Remember Me” when log in

Since we cannot edit the php.ini to increase the session timeout easily, try to add this as a javascript inside the index.html or any html file that your website had, this will increase the admin and user session timeout for the opencart:

(function($) {
  var interval = setInterval(pingServer, 60000);

  function pingServer() {
      $.ajax({ url: location.href });
  }

  setTimeout(function() {
    clearInterval(interval);
  }, 1440000);
})(jQuery);

I’ve found this code from Stackoverflow on internet.

1 Like

The problem is that when I click to view my opencart store and after I want to do some work to my website I get log out.I log in, I view my site, I log out from admin page.This always happens.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.