|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64306 sometimes rmdir() doesn't really remove folder if WinCache extension enabled
Submitted: 2013-02-27 05:36 UTC Modified: 2013-11-20 22:20 UTC
From: pvasilevich at parallels dot com Assigned: ericsten (profile)
Status: Closed Package: WinCache (PECL)
PHP Version: 5.4.12 OS: Windows 2008R2
Private report: No CVE-ID: None
 [2013-02-27 05:36 UTC] pvasilevich at parallels dot com
rmdir() function is intercepted by WinCache extension and replaced by its own implementation. Before original rmdir() is called, wincache tries to lookup directory passed to rmdir() in filecache (aplist_fcache_get function) and if this lookup is failed by some reasons, then original function is not even called. And directory is not removed in fact.

After enabling debug in php.ini and some experiments I've detected that aplist_fcache_get can return FATAL_OUT_OF_SMEMORY error. If this happened, directory is not removed.

I think this is not valid behavior, and original handler should be called, if specified location cannot be found in file cache.

I have applied patch that returns error after original handler is called.


rmdir_fix (last revision 2013-02-27 05:38 UTC by pvasilevich at parallels dot com)

Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-11-20 22:20 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: ericsten
 [2013-11-20 22:20 UTC]
The fix for this bug has been committed.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

fixed in SVN revision 332173
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Jul 16 06:01:26 2019 UTC