这个问题一直让我发疯。在两个单独的项目中(两者都使用 PEAR 作为库,但编写在完全不同的自定义框架上),我使用 PEAR Auth 进行使用会话的身份验证。
登录后,用户在空闲一个小时左右就会退出。我没有确切的时间,但时间很短。
我尝试了以下但没有成功。所有尝试将会议延长到一天,只是为了把重点放在家里。
<?php
// Tried built-in methods to extend the idle time, called after Auth is initialised
$auth->setIdle( 86400 );
// Tried increasing the sesion timeout (before auth is called)
ini_set( 'session.gc_maxlifetime', 86400 );
// Tried increasing the cookie timeout (where the phpsession is held, before auth is called)
session_set_cookie_params( 86400 );
// Tried all of the above
?>
其他人遇到过这个问题吗?如果是这样,是否可以延长空闲时间?
我即将准备好草皮 PEAR 并编写我自己的基于 cookie 的身份验证类,但我真的没有时间。