I just noticed that my sessions directory was full with hundred-thousands of session files . It was even not possible to clean the directory with rm *. Luckily midnight commander did the trick.
You might want to add a function to delete the session files after the session timed out
Express Hosting
"We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#167792 - 11/05/0611:26 AMRe: Session files get not cleared
[Re: Philipp]
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
This is handled natively by PHP, at least it's supposed to be. There is a setting in php.ini that designates how stale they need to be before they are cleared. Not back at home yet, so I can't actually check on the exact setting.
Thanks, I found the problem. It is related to the Debian PHP5 package, which handle session garbage collection different than other Linux distributions.
From the php.ini:
Code:
; This is disabled in the Debian packages, due to the strict permissions
; on /var/lib/php5. Instead of setting this here, see the cronjob at
; /etc/cron.d/php5, which uses the session.gc_maxlifetime setting below
;session.gc_probability = 0
session.gc_divisor = 100
Registered: 06/05/06
Posts: 14994
Loc: Portland, OR; USA
If your host allows you to, you can set these in a .htaccess file when you don't have access to edit the php.ini (although I'm unsure as to what level of permissions you'd need to override this setting)
To check if this actually works wiht the security level they allow you (I use AllowOverride ALL in my php.ini for my sites so i can override settings as needed) you'll need to open a phpinfo script to check.