Author Topic: /temp size growing  (Read 5874 times)

Offline LoJo

  • Jr. Member
  • **
  • Posts: 15
/temp size growing
« on: December 27, 2015, 09:53:00 AM »
Hello,
I have a roundcube 1.1.3 install (I will update to 1.1.4 soon)
The /temp folder is growing : ther is files since 2011!
However, $config['temp_dir_ttl'] is set to 48h in the config file.

- why ?
- is there a soluce to autoclean /temp ?
- can I simply erase /temp content without a bad side effect ?

Thanks ;-)

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Re: /temp size growing
« Reply #1 on: December 28, 2015, 03:00:48 AM »
Looks like you have session garbage collector disabled in PHP config. Enable it or use bin/gc.sh script from cron.

Offline LoJo

  • Jr. Member
  • **
  • Posts: 15
Re: /temp size growing
« Reply #2 on: December 28, 2015, 03:21:42 AM »
Hello,
RC is installed on a shared web hosting.
I can use a web cron to run php scripts, but not bash scripts.
Is there a alternate solution ?

Thanks

[edit]
I upgraded to RC 1.1.4

I just verified my phpinfo(), and I have :

session.gc_divisor   100
session.gc_maxlifetime   1440
session.gc_probability   0
« Last Edit: December 28, 2015, 04:46:53 AM by LoJo »

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Re: /temp size growing
« Reply #3 on: December 28, 2015, 05:48:21 AM »
Hello,
RC is installed on a shared web hosting.
I can use a web cron to run php scripts, but not bash scripts.
Is there a alternate solution ?
Remove first line and this is a PHP script.
Quote
session.gc_divisor   100
session.gc_maxlifetime   1440
session.gc_probability   0
session.gc_probability  1

Offline LoJo

  • Jr. Member
  • **
  • Posts: 15
[SOLVED] /temp size growing
« Reply #4 on: December 28, 2015, 12:14:16 PM »
session.gc_divisor   100
session.gc_maxlifetime   1440
session.gc_probability   0
session.gc_probability  1

Hello,
I added this line in the index.php file :
Code: [Select]
ini_set('session.gc_probability','1');
And my /temp folder is now empty ;-)

Is the index.php file the better place to put that line ?
Is it better to put it in program/include/iniset.php ?

Thanks !