- Posts: 4
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
automatically clear old tmp/assets folders?
- ArthurOne
- Topic Author
- Offline
- New Member
Is there anyway to automatically clear/delete old folders from the tmp/assets directory ? I was wondering if there was any option in LimeSurvey 2.55 which will allow me to schedule the removal of old folders from the tmp/assets.
Thanks.
- tpartner
- Offline
- LimeSurvey Community Team
- Posts: 10108
- Thank you received: 3593
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
- ArthurOne
- Topic Author
- Offline
- New Member
- Posts: 4
- Thank you received: 0
That button would be really useful in my opinion although I get his point.
- LouisGac
- Visitor
ArthurOne wrote: Hi!
Is there anyway to automatically clear/delete old folders from the tmp/assets directory ? I was wondering if there was any option in LimeSurvey 2.55 which will allow me to schedule the removal of old folders from the tmp/assets.
Thanks.
A PHP application is launched only when you call it (url or command line). It's not a deamon that runs all the time and that can perform an operation at a given date.
So any scheduled application related to a server maintenance (like deleting files in logs or temporary folders) should be done with the server cron jobs. Example for Ubuntu:
help.ubuntu.com/community/CronHowto
Another way to do could be to configure LimeSurvey so it uses the server tmp directory which is cleaned at every reboot. This setting can be overridden inside config.php:
github.com/LimeSurvey/LimeSurvey/blob/ma...ig-defaults.php#L638
(the LS subfolder in the tmp directory should be then reachable from Internet)
TPartner is speaking about a button to "refresh" the assets (to change the random string of the asset folder name, so it forces browsers to refresh its cache), it's pretty different.
- DenisChenu
- Offline
- LimeSurvey Community Team
- Posts: 13642
- Thank you received: 2491
/tmp/ is rarely accessible via web access (and fortunately in general …).LouisGac wrote: …
Another way to do could be to configure LimeSurvey so it uses the server tmp directory which is cleaned at every reboot. This setting can be overridden inside config.php:
github.com/LimeSurvey/LimeSurvey/blob/ma...ig-defaults.php#L638
(the LS subfolder in the tmp directory should be then reachable from Internet)
…
I think /tmp can be used for runtimePath but not for assets .
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
- jelo
- Offline
- Platinum Member
- Posts: 5033
- Thank you received: 1257
tmp isn't always cleaned at every reboot. That depends on many settings. If tmp is pointing to a ram disk, a reboot cleans tmp. But if tmp is on a harddisk, tmp isn't always cleared via a reboot. Depending on the OS there are many different behaviors.LouisGac wrote: Another way to do could be to configure LimeSurvey so it uses the server tmp directory which is cleaned at every reboot. [..] (the LS subfolder in the tmp directory should be then reachable from Internet)
And placing LS assets in a subdirectory in the serverwide tmp directory seems to be a way to get more issues. Hopefully it is not the case on the SaaS offers by LS GmbH
The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users