1
antifmradio
cleaning templace_c folder

ok so daily i have been going into my
templates_c folder and deleting all the files except the index file

is there a way to do this automatically apon a certain maximum number of files in there or over a set number of days?
i dont know how to do CRON JOBS

I looked around and found this but there are no comments on it yet and wanted to know if anyone has had any use with it so far

XoopsCare 1.2

https://xoops.org/modules/repository/singlefile.php?cid=101&lid=1693

2
antifmradio
Re: cleaning templace_c folder

bump

3
Catzwolf
Re: cleaning templace_c folder
  • 2008/4/6 2:15

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


No XOOPS doesn't handle this directly, this is a bug I have known for the longest and nothing has been done about it.

I do have a fix for it, but I will need to dig it out though.

You could use a cron job to do this:
Quote:

find /yourdir/tmp -mtime +1 -exec rm {} \;


//where 1 is number of days since it was modified

John

4
nekro
Re: cleaning templace_c folder
  • 2008/4/6 4:40

  • nekro

  • Quite a regular

  • Posts: 213

  • Since: 2005/11/9


I dont know why you need to do this?

5
Catzwolf
Re: cleaning templace_c folder
  • 2008/4/6 10:12

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


When you start working with very large XOOPS based sites, this folder actually starts to slow down things a lot. Updating preferences can take ages and in some cases actually create server based errors.

I found that I had to remove the XOOPS update cache when saving prefs, and to use a cron job to do this in the background to prevent these issues. Again, a issue I reported years age gone ignored.

6
hervet
Re: cleaning templace_c folder
  • 2008/4/6 10:22

  • hervet

  • Friend of XOOPS

  • Posts: 2267

  • Since: 2003/11/4


I'm using my module (XoopsCare) to do what you described.
If you don't have CRONs, use the module's block, it will clean your cache periodically.

7
Anonymous
Re: cleaning templace_c folder
  • 2008/4/6 10:34

  • Anonymous

  • Posts: 0

  • Since:


Quote:
hervet wrote:

I'm using my module (XoopsCare) to do what you described.


Ditto.... download it fromhttp://www.instant-zero.com/

I also agree with Catz - the templates_c folder can become a bit unwieldy, particularly if you allow your site's users a choice of themes.

I would be really good to have a "Clear templates_c folder" option in the core, either a button to do it manually or a setting to enable it to be carried out periodically. Probably best to have both, though.

8
Shine
Re: cleaning templace_c folder
  • 2008/4/6 11:47

  • Shine

  • Just can't stay away

  • Posts: 822

  • Since: 2002/7/22


7dana has for quite some years (as of 2004!!!) a module: template_c cleaner.
Download:
http://www.7dana.com/download/pafiledb.php?action=category&id=7
Works like a charm.

9
pulapol
Re: cleaning templace_c folder
  • 2008/4/6 13:09

  • pulapol

  • Just popping in

  • Posts: 55

  • Since: 2008/4/6 1


speaking of xoopscare....

last year i installed it in my site...and sometimes my cache, templates_c & uploads folder automaticlly turns to 755 mode
this happens like 3 times a week..and i have to turn it back to chmod 777 for my site to be accessible....

this happens for a couple of weeks..i thought this is normal maybe my server admin update the server setting but i checked with my server admin they said their did not do any update to my server setting...and nothing wrong with my sevr

when i did my own troubleshooting & deactivate the xoopscare module...my site backs to normal and i don't have this problem anymore...

now i have to do manual deletion of the cache and templates c folder and also db optimization

i'm using 2.018.1 and the latest xoopscare

is there anyone having the same problem ?



i'll try with the cron job thing



Quote:

find /yourdir/tmp -mtime +1 -exec rm {} \;


what is tmp..no tmp in my server directory

this is what my cron job screen look like

Resized Image

what should i put exactly in the "command to run box"

i want to clean the templatesc and cache folder..

10
pulapol
Re: cleaning templace_c folder
  • 2008/4/6 13:19

  • pulapol

  • Just popping in

  • Posts: 55

  • Since: 2008/4/6 1


just checked the cleaner module
is there anyway to let the index.html stay..the cleaner also delete the index.html file..
and also how to make cleaner module to delete also the content of cache folder..

this is what i found in clean.php inside admin folder

<?php
chdir
("../../../templates_c");
system("rm -rf -- .* *");
?>


that should be simple to do right ?

thank you

Login

Who's Online

211 user(s) are online (143 user(s) are browsing Support Forums)


Members: 0


Guests: 211


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits