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

rename() sometimes fails

 
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 -> Bugs
View previous topic :: View next topic  
Author Message
ziege
Smarty Rookie


Joined: 16 Aug 2005
Posts: 13

PostPosted: Tue Feb 01, 2011 1:56 pm    Post subject: rename() sometimes fails Reply with quote

I just got the following error on my developer machine (Windows XP SP3, Apache 2.2.x, PHP 5.3.5):

"rename(C:\myprojectdir\smarty\cache\default\7e53852a21f1d3f4dd4e9850df529010\ff\f7\cf\wrt3D.tmp,C:/myprojectdir/smarty/cache/default\7e53852a21f1d3f4dd4e9850df529010\ff\f7\cf\fff7cf9c0f309cf8b1056faa8f82d1ca03fa5565.templatename.tpl.php): Zugriff verweigert (code: 5)" in "smarty_internal_write_file.php" on line 48.

"Zugriff verweigert" means "Access denied", so one of the files seems to be in use, and I guess it's the target file (this means that also the unlink of the existing target file failed, but this error is suppressed in line 46).

A reload of the page solves the problem.
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7368
Location: Lincoln Nebraska, USA

PostPosted: Tue Feb 01, 2011 2:54 pm    Post subject: Reply with quote

are you doing this on a live server with a lot of traffic? just a guess, but you could be running into a race condition where several tmp files are trying to rename themselves to the same filename. on linux they will rename fine over each other, but windows may behave differently (?)
Back to top
View user's profile Send private message Visit poster's website
ziege
Smarty Rookie


Joined: 16 Aug 2005
Posts: 13

PostPosted: Wed Feb 02, 2011 10:28 am    Post subject: Reply with quote

No, it's my developer machine and it's only used by me - no other user and no cronjob/scheduled task.
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 5068
Location: Hamburg / Germany

PostPosted: Wed Feb 02, 2011 1:33 pm    Post subject: Reply with quote

I have seen this sometimes myself on Windows XP. It looks like that deleting a file could be delayed. I have never seen it on Windows Server versions or Windows 7 which I'm running now.
Back to top
View user's profile Send private message
dimiak
Smarty n00b


Joined: 02 Jan 2011
Posts: 4

PostPosted: Sat Feb 19, 2011 5:34 pm    Post subject: Reply with quote

Yeah, the same I have on WIN 7, Please see post http://www.smarty.net/forums/viewtopic.php?t=18865.

Thanks in Advance
Back to top
View user's profile Send private message
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 -> Bugs 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