10-14-2009, 03:58 PM | #1 |
Junior Member
Join Date: Oct 2009
Posts: 21
|
Debian and directory mod-tmp for sessions
Hi,
I've got problem with ISPManager on Debian (5.0.3) and php sessions stored in /var/www/<user>/data/mod-tmp. Debian (I don't know about any other distribution now) doesn't know, how to delete old session files in this directories. It use /etc/cron.d/php5 for remove sessions from /var/lib/php5 and we must wrote special scripts (or add new dir to script) for every user.. Is there any ISPManager-like solution? Or is it bug? edit: it's ISPManager 4.3 Lite... Thanx. Last edited by stderr; 10-14-2009 at 04:08 PM. |
10-15-2009, 08:42 AM | #2 |
ISPsystem team
Join Date: May 2008
Location: ISPsystem
Posts: 588
|
ISPmanager add line to virtualhost php_admin_value session.save_path "/var/www/user/data/mod-tmp" for save sessions if PHP running as apache module and add to /var/www/user/data/php-bin/php.ini session.save_path = "/var/www/user/data/tmp" if PHP run as CGI or FastCGI.
This is not configurable. |
10-15-2009, 10:47 AM | #3 |
Junior Member
Join Date: Oct 2009
Posts: 21
|
I know. But ISPManager don't change /etc/cron.d/php5 for erasing old sessions and there are (and that's my problem) a lot of files files in directory. And directory size is still growing (1,5GB per two days!)..
I changed cron file manually (if somebody has same problem): Code:
USER="user1 user2 user3" 09,39 * * * * root for user in $USER ; do [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/www/$user/data/mod-tmp ] && find /var/www/$user/data/mod-tmp/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -n 200 -r -0 rm ; done |
|
|