Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 11th December 2009, 19:25
asticot asticot is offline
Junior Member
 
Join Date: Jul 2009
Posts: 10
Thanks: 1
Thanked 3 Times in 3 Posts
Default php individual tmp sessions not deleted

Hi,

On my ISPCONFIG server (running on debian 5), I have a little problem with the automatic deletion of tmp files that are in /var/www/clients/clientX/webX/tmp/

In the /etc/php5/apache2/php.ini file, I have :

; 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.
; php scripts using their own session.save_path should make sure garbage
; collection is enabled by setting session.gc_probability
;session.gc_probability = 0
session.gc_divisor = 100

; After this number of seconds, stored data will be seen as 'garbage' and
; cleaned up by the garbage collection process.
session.gc_maxlifetime = 1440


The cronjob /etc/cron.d/php5 runs every 30 minutes but it delete only tmp files that are in /var/lib/php5


Since all my website have a apache directive :

php_admin_value session.save_path /var/www/clients/client1/web1/tmp

There are many location for tmp files. And so the problem is that all tmp files of each website are not deleted.

Do you know what to do ?
- Should I enabled "session.gc_probability = 1" in my php.ini ?
- Should I remove the session.save_path for each website ?
- Should I write a script to manually delete tmp files ?


Sincerely,
Jerome
Reply With Quote
Sponsored Links
  #2  
Old 14th December 2009, 16:54
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 37,015
Thanks: 840
Thanked 5,652 Times in 4,461 Posts
Default

This is a problem in php. If a custom session tmp dir is defined, php will not care about removing sessions files anymore. The best way to solve this is to write a custom script. We will add such a script in ispconfig too to fix this php problem.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 14th December 2009, 17:27
asticot asticot is offline
Junior Member
 
Join Date: Jul 2009
Posts: 10
Thanks: 1
Thanked 3 Times in 3 Posts
Default

OK thank you Till,

For information, here is what I am doing now manually :

In each tmp dir :
find -cmin +24 | xargs rm

This command will delete all files that were not changed for 24 minutes.
Reply With Quote
The Following User Says Thank You to asticot For This Useful Post:
till (14th December 2009)
  #4  
Old 14th December 2009, 20:32
xaver xaver is offline
Member
 
Join Date: May 2009
Posts: 77
Thanks: 10
Thanked 25 Times in 14 Posts
Default

Hello,

i had this Problem twice.
If i open a session and switch from mod_php to fastcgi + suexec the problem start because www-data is the old User and the new user is web??:client??.
The user can't change the file anymore.

Regrads
Reply With Quote
  #5  
Old 30th June 2013, 17:37
gzx21 gzx21 is offline
Junior Member
 
Join Date: May 2013
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hello,

I was wondering whether this problem was fixed. I am using ISPConfig version 3.0.5.2 (Debian Wheezy, Apache) and it still seems to be an issue.

Till, perhaps if the deletion script is not in the production, would you be so kind as to provide the script if you managed to write it?

Thank you very much.
Reply With Quote
  #6  
Old 1st July 2013, 00:47
asticot asticot is offline
Junior Member
 
Join Date: Jul 2009
Posts: 10
Thanks: 1
Thanked 3 Times in 3 Posts
Default

Yes I confirm this issue was fixed a long time ago.
Reply With Quote
The Following User Says Thank You to asticot For This Useful Post:
gzx21 (1st July 2013)
  #7  
Old 1st July 2013, 01:26
gzx21 gzx21 is offline
Junior Member
 
Join Date: May 2013
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
 
Default

OK, so how is it possible that it's still happening in my installation? Is it possible that I might have misconfigured something? I closely followed the guides on HowtoForge, nothing really special.

Is it possible that these log messages are related to the problem? They appear every 30 minutes in my local mail:
http://pastebin.com/NpPkKSdf

Thank you.
Reply With Quote
Reply

Bookmarks

Tags
tmp session_path

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ffmpeg Video support for ubuntu 7.10 [suphp-ispconfig] amaurib Installation/Configuration 13 16th February 2010 18:26
Unable to install ISPConfig bdonecker Installation/Configuration 21 26th May 2009 09:20
ISP Config hesitation when opening web pages frankb Installation/Configuration 7 15th December 2008 14:06
ispconfig php 5 errors itamarjp Installation/Configuration 8 25th April 2008 11:20
Apache2 Freezes celtic Server Operation 31 28th May 2007 18:18


All times are GMT +2. The time now is 16:38.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.