Afficher un message
Vieux 30/01/2006, 14h56   #4
Jan Rosier
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: [SMARTY] Re: windows problem with loads of *.tmp files - MOREinfo

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:
>> 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:
>>
>>> I've setting up a site using Smarty on windows/IIS/fast-cgi.
>>>
>>> There is a shared smartty compile dir .. However this firectory is
>>> filles up with zero length files with the format wrtXXXX.tmp where
>>> XXXX is a four digit number
>>>
>>> HAve no inkling why this is happening.. and it seems strange its in
>>> the SMarty dir ??
>>>
>>> here's the code for the configuration
>>>
>>> define('SITE_KEY','bias_va');
>>>
>>> define('SMARTY_DIR', SITE_ROOT.'/libs/Smarty-2.6.12/libs/');
>>> require_once(SMARTY_DIR.'Smarty.class.php');
>>> $smarty = new Smarty();
>>> $smarty->debugging = true; // only on test server
>>>
>>> //** smarty compile
>>> $smarty->force_compile = true; //( SERVER_NAME == DEV_SERVER );
>>> // only on test server
>>> $smarty->compile_check = true;
>>> $smarty->compile_id = SITE_KEY;
>>> $smarty->compile_dir = SITE_ROOT.'/smarty_compile_dir';
>>> $smarty->use_sub_dirs = false; //f&*( windows
>>>
>>>
>>>
>>> any idea
>>> Pete

>>
>>

>


30a31,33
> if (file_exists($_tmp_file)) {
> @unlink($_tmp_file);
> }


  Réponse avec citation
 
Page generated in 0,06412 seconds with 9 queries