【发布时间】:2010-12-02 10:31:03
【问题描述】:
这个问题让我发疯了。在两个单独的项目中(两者都使用 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 的身份验证类,但我真的没有时间。
【问题讨论】:
标签: php pear session-timeout authentication