OpenCart-如何增加管理员会话的超时时间? [英] OpenCart - How do you increase the Admin session timeout?
问题描述
当前,OpenCart中的Admin会话大约需要30秒.我想知道是否有PHP文件,或者是否可以通过某种方式增加登录超时会话?
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>
此文件已放置在 admin/view/template/common/header.tpl
This file has been placed in admin/view/template/common/header.tpl
推荐答案
很可能可以通过更改session.gc_maxlifetime
的值来解决.您可以通过.htaccess,php.ini甚至在脚本本身(在session_start()
之前)
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()
)
这篇关于OpenCart-如何增加管理员会话的超时时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!