Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Ok , i got it guy . I make Smarty work :)

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup
View previous topic :: View next topic  
Author Message
quocbao
Smarty Rookie


Joined: 30 Aug 2004
Posts: 8

PostPosted: Mon Aug 30, 2004 6:46 am    Post subject: Ok , i got it guy . I make Smarty work :) Reply with quote

Well , finally , after 15 minutes viewing the source , i think i solved the problem :

this is how smarty working (am i right ? Smile )

Smarty parses data and create a tempory compiled script in temp folder and then it changes the modification time of this file and then move it to compile dir . In windows , it will create a file in Temp folder , and change the modofication time , but by somehow , after changing , windows will automaticaly delete this file (maybe this is Smarty error , duno Smile ) .

HOW TO FIX ?

Very simple , instead of changing the modification time of tempory file , i'll change the modification time of compiled file (changing after rename , not before) .

Here is the detail

Open core/core.write_file.php

find and comment (or remove it if yu want)

Code:

    if (isset($params['timestamp'])) {
       touch($_tmp_file, $params['timestamp']);
    }


and then

find

Code:

@chmod($params['filename'], $smarty->_file_perms);


and add after

Code:

    if (isset($params['timestamp'])) {
       touch($params['filename'], $params['timestamp']);
    }


The same effect , but no error at all . Long live Smarty Twisted Evil
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Mon Aug 30, 2004 7:26 am    Post subject: Reply with quote

FYI: changing the modification-time of the compiled file is abandoned in the CVS version of smarty.

see: http://cvs.php.net/smarty/libs/core/core.write_file.php
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Installation and Setup All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP