dongxi1943 2010-12-26 17:28
浏览 219
已采纳

是ini_set('session.save_path','自定义路径'); 会议垃圾清洁?

Does ini_set('session.save_path', 'custom path'); effect the session garbage cleaner?

As I'm setting a custom directory for the sessions, because I've read from various php security guides, that setting a custom directory on shared hosting for sessions; can improve session security.

But the problem is I've read somewhere that PHP does/handles the session garbage cleaning only when the session_save_path is the default and not modified (ie. using a custom directory)? - is this true, if so is their a solution for this?.

(take into consideration I'm using shared hosting).

Appreciate all help!

  • 写回答

2条回答 默认 最新

  • dongsaohu6429 2010-12-26 19:45
    关注

    The garbage collector kicks in before control is handed over to your script, so when the GC kicks in, the save_path set in php.ini will be in effect, not the path you're overriding with.

    Essentially, you cannot use the default garbage collector if you override the save_path from within your scripts. The session files will be stored in the override directory, but the GC will look in the previous dir, which would now have no session files in it.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

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