session.php中laravel生存期配置变量的最大可能值是多少 [英] What's the highest possible value for the laravel lifetime config variable in session.php
问题描述
默认情况下,laravel会话会在两个小时后过期,我知道这是出于安全考虑,但是我有一个Web应用程序,其中包含一个移动应用程序(android webview).用户不断抱怨他们每次访问该应用程序都需要登录.作为临时解决方案,我想知道如何将这个变量设置为"forever".预先感谢
By default laravel sessions expire after two hours, I know this is for security but I have a web app which has a mobile app(android webview). Users keep complaining that they need to login each time they come to the app. As a temporal solution I will like to know how I can set this variable to "forever". thanks in advance
'lifetime' => 120
我想要什么
'lifetime' => infinity
推荐答案
对于32位平台,PHP中的最大整数值为2147483647
,Laravel将lifetime
值乘以60.
Max integer value in PHP is 2147483647
for 32 bit platform and Laravel multiplies lifetime
value by 60.
因此对于32位平台,最大lifetime
值是35791394
.这是68年的历史,因此对于本届会议来说,这是无限的. )
So maximum lifetime
value is 35791394
for 32-bit platform. It's 68 years, so it's kind of infinity for the session. )
这篇关于session.php中laravel生存期配置变量的最大可能值是多少的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!