10
|
Phill Pafford · 技术社区 · 14 年前 |
![]() |
1
8
编辑文件
该值应以秒为单位。这个文件实际上也会检查你的php.ini,所以我不知道为什么它不适合你。 |
![]() |
2
3
这是serverfault.com的一个问题。
然而,变化
编辑
|
![]() |
3
1
您可以提供自己的会话路径
但是,您需要提供适当的机制来管理不需要的会话文件。
在我的
; NOTE: If you are using the subdirectory option for storing session files ; (see session.save_path above), then garbage collection does *not* ; happen automatically. You will need to do your own garbage ; collection through a shell script, cron entry, or some other method. ; For example, the following script would is the equivalent of ; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes): ; cd /path/to/sessions; find -cmin +24 | xargs rm
我最近遇到了这个问题,因为我使用的是php和
|
![]() |
4
1
如果您来这里是因为您的cron每30分钟(09和39)发送一次错误,那么您的系统日志和/或邮箱中可能有similar错误:
原因可能是你
我不得不对以下几行进行评论,错误就消失了。
我写这篇文章是因为如果你搜索错误信息,这是Google最热门的搜索结果之一,它可能会影响许多用户/管理员,这些用户/管理员在多个版本中维护他们的Debian安装。 |
![]() |
5
0
就在你的php5 cronjob片段中: 每隔30分钟查找并清除旧会话如果脚本的执行时间不超过30分钟,则脚本清除24分钟的旧会话并不重要:) |
|
6
0
使用下面的cron删除未使用的会话。 39 20***root[-x/usr/lib/php5/maxlifetime]&&[-d/var/lib/php5]&&find/var/lib/php5/-depth-mindepth 1-maxdepth 1-type f-cmin+$(/usr/lib/php5/maxlifetime)-print0 xargs-r-0 rm |