|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
ziege Smarty Rookie
Joined: 16 Aug 2005 Posts: 13
|
Posted: Tue Feb 01, 2011 1:56 pm Post subject: rename() sometimes fails |
|
|
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 |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Tue Feb 01, 2011 2:54 pm Post subject: |
|
|
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 |
|
ziege Smarty Rookie
Joined: 16 Aug 2005 Posts: 13
|
Posted: Wed Feb 02, 2011 10:28 am Post subject: |
|
|
No, it's my developer machine and it's only used by me - no other user and no cronjob/scheduled task. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Wed Feb 02, 2011 1:33 pm Post subject: |
|
|
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 |
|
dimiak Smarty n00b
Joined: 02 Jan 2011 Posts: 4
|
|
Back to top |
|
|
|
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
|