For Programmers: Free Programming Magazines  


Home > Archive > PHP Smarty Templates > January 2006 > Re: [SMARTY] Re: windows problem with loads of *.tmp files - MORE









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [SMARTY] Re: windows problem with loads of *.tmp files - MORE
Jochem Maas

2006-01-30, 8:02 am

Pedro wrote:
> its Smarty-2.1.12
>
> There are 6 templatess and therefore six compile files..
>
> However each time I "refresh" another 6 *.tmp files appear (as I have
> force_compile on).
>
> this is confusing !


sounds like the OS is not allowing smarty to delete it's own tmp files.

>
> pete
>
>
> Pedro wrote:
>
>
>

Jan Rosier

2006-01-30, 7:05 pm

I think the problem is in the file libs/internals/core.write_file.php.
Try the patched version attached to this mail.

Here is what I think is happening:
At line 28 an temp file is created, then at line 30 this file is opened
for writing.
If opening the temp file fails Smarty will try to create a temp file
using uniqid() (line 31)
But the temp file already created at line 28 isn't removed first.

I also attached a diff to the last version that is in the cvs.

Greetings,
Jan Rosier



Jochem Maas wrote:
> Pedro wrote:
>
> sounds like the OS is not allowing smarty to delete it's own tmp files.
>
>


Jan Rosier

2006-01-30, 7:05 pm

The attached php file got lost. This time the file is attached as text
file. Hope this works...

Greetings,
Jan Rosier


Jan Rosier wrote:
> I think the problem is in the file libs/internals/core.write_file.php.
> Try the patched version attached to this mail.
>
> Here is what I think is happening:
> At line 28 an temp file is created, then at line 30 this file is
> opened for writing.
> If opening the temp file fails Smarty will try to create a temp file
> using uniqid() (line 31)
> But the temp file already created at line 28 isn't removed first.
>
> I also attached a diff to the last version that is in the cvs.
>
> Greetings,
> Jan Rosier
>
>


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com