On my server, occasionally, scripts and cache files created by scripts become locked by the PHP process. Once locked they cannot be accessed either via network share, locally on the server or by PHP itself. Refreshing the page results in access denied errors:
Warning: rmdir(C:\inetpub\wwwroot\mdblog\public\..\cache\posts\2012)
[function.rmdir]: Directory not empty in
C:\inetpub\wwwroot\mdblog\public\system\Filesystem.php on line 52
Line 52 is rmdir($dir);
.
The problem is more prevalent after a 'high' amount of disk operations (refreshing a page quickly in succession, deleting many files at once etc). It is a Windows Server 2008 R2 server with IIS7 and PHP 5.3.13 (using FastCGI), running on a VM server, no virus-scanner, with PHP installed using the Web Platform Installer. dxdiag
Doing an iisreset
fixes the problem temporarily. I am writing a static site generation function however which causes this problem to come up every few minutes.