1

如何在某些非活動狀態後自動註銷會話?我想在zend framework 3中使用這個功能。如果有人有想法,請讓我通知please.Currently我的應用程序在5分鐘內使用zend skeleton註銷。但我希望會話過期至少30分鐘。ZF3註銷一些非活動會話後

請爲上述提供解決方案。

+0

你使用的服務器操作系統被添加? – tasmaniski

+0

Ubuntu 14.04,LAMP – Ohm

回答

0

只需添加在您的module.config.php此會話配置,並確保Zend\Session已經config/modules.config.php

use Zend\Session\Storage\SessionArrayStorage; 

return [ 
    // your existing config 

    'session_config' => [ 
     'cookie_lifetime' => 60 * 30 
    ], 
    'session_storage' => [ 
     'type' => SessionArrayStorage::class 
    ], 
]; 
+0

感謝Dolly Aswin。 但使用上述解決方案,我已經嘗試過了。請參閱 https://stackoverflow.com/questions/44801013/zf3-session-timeout-issue – Ohm