Just a note for developers who write modules that create temporary files...<br><br>I've found that a register_shutdown_function('file_delete', realpath($path_to_file)) is pretty dependable for cleaning up... note the use of realpath, it's necessary for shutdown functions<br>
and file_delete has the file_exists check in it to prevent errors in the shutdown phase..<br><br>.darrel.<br><br><div class="gmail_quote">On Fri, Jul 11, 2008 at 5:43 AM, Miriam Natanzon <<a href="mailto:miriam@mail.snunit.k12.il">miriam@mail.snunit.k12.il</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Thanks for your all responses!<br>
<br>
I'm using Drupal 5.7, and understood Drupal core and also Drupal cron didn't<br>
take care of that issue of deleting old unused files from Tmp...<br>
I think it's the right place because I didn't expect Drupal to fix it in<br>
this version and wonder if someone develop a script fix it.<br>
I saw there files with "tmp_" prefix (machine names) and also files with<br>
human-names.<br>
( Someone guessed there is an module that upload files and didn't care of<br>
deleting the temporary files, It's can be the audio module in my site.. )<br>
<font color="#888888"><br>
<br>
<br>
Miriam.<br>
</font><div><div></div><div class="Wj3C7c"><br>
<br>
-----Original Message-----<br>
From: <a href="mailto:development-bounces@drupal.org">development-bounces@drupal.org</a><br>
[mailto:<a href="mailto:development-bounces@drupal.org">development-bounces@drupal.org</a>]On Behalf Of mark burdett<br>
Sent: Thursday, July 10, 2008 7:44 PM<br>
To: <a href="mailto:development@drupal.org">development@drupal.org</a><br>
Subject: Re: [development] Tmp directory<br>
<br>
I'm guessing this issue is re: Drupal 5, but in Drupal 6 there is an<br>
over-zealous temp file cleanup, it only allows them to stick around<br>
for 24 minutes. <a href="http://drupal.org/node/276018" target="_blank">http://drupal.org/node/276018</a><br>
<br>
--mark<br>
<br>
On Thu, Jul 10, 2008 at 9:30 AM, Morbus Iff <<a href="mailto:morbus@disobey.com">morbus@disobey.com</a>> wrote:<br>
>>> It is a development request to the extent that this may be a "bug by<br>
>>> design"; what is supposed to happen to the tmp files? Are people who may<br>
>>> not<br>
>>> be system admin gurus supposed to know that these files accumulate, and<br>
>>> what<br>
>>> to do with them?<br>
>><br>
>> But the OP didn't raise a development topic; it was a topic of support.<br>
>> There is a different list for that.<br>
><br>
> I'm on the fence. Largely:<br>
><br>
> * if Drupal is leaving tmp files around, something has gone wrong<br>
> at a high enough level that we probably /can't/ "fix it" by<br>
> removing the temp files.<br>
><br>
> * most servers have a tmpwatch utility of some kind that automatically<br>
> purges left over files. This, of course, presumes that Drupal's temp<br>
> directory remains at the default /tmp. If it's moved elsewhere, then<br>
> Drupal becomes responsible for cleaning up the files (and we'd<br>
> probably want to implement some sort of post-cleanup in a cron).<br>
><br>
> --<br>
> Morbus Iff ( and think about the bad things that I didn't do )<br>
> Technical: <a href="http://www.oreillynet.com/pub/au/779" target="_blank">http://www.oreillynet.com/pub/au/779</a><br>
> Enjoy: <a href="http://www.disobey.com/" target="_blank">http://www.disobey.com/</a> and <a href="http://www.videounderbelly.com/" target="_blank">http://www.videounderbelly.com/</a><br>
> aim: akaMorbus / skype: morbusiff / icq: 2927491 / <a href="http://jabber.org" target="_blank">jabber.org</a>: morbus<br>
><br>
<br>
</div></div></blockquote></div><br>