Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenCart - How do you increase the Admin session timeout?

Currently the Admin session in OpenCart is about 30 seconds. I was wondering is there a PHP file or is there some way I can increase the timeout session for the login?

Currently I have been told this solution works but it does not:

<script type="text/javascript">
function pingServer() {
    $.ajax({ url: location.href });
}
$(document).ready(function() {
    setInterval('pingServer()', 60000);
});
</script>

This file has been placed in admin/view/template/common/header.tpl

like image 284
TheBlackBenzKid Avatar asked Jan 24 '26 20:01

TheBlackBenzKid


1 Answers

This can most likely be solved simply by changing the value of session.gc_maxlifetime. You can change this via .htaccess, php.ini or even in your script itself (before the session_start())

like image 130
Jay Gilford Avatar answered Jan 26 '26 12:01

Jay Gilford



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!