douyingtai6662 2014-08-25 11:39
浏览 81

可以在php中设置无限制的会话超时

I have my website that need login for view further information. My problem is that when user login the session is started to a limited time that already define in php.ini file. I want to unlimited this session time when user log in. I already user ini_set() function i-e:

ini_set("session.gc_maxlifetime",720000); 
ini_set('session.gc_probability',1); 
ini_set('session.gc_divisor',1); 

which temproraily set php_ini value of session time. but it coul'nt work.

Is there something im doing wrong?

Please help me for resolve this problem

  • 写回答

2条回答 默认 最新

  • douping3427 2014-08-25 11:44
    关注

    Set session.gc_probability to 0 before starting the session. This will give the garbage collector a 0% chance of removing session data. You have to do this in all applications that share the same session storage location.

    评论

报告相同问题?

悬赏问题

  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测