|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2015-05-08 20:25 UTC] ericsten@php.net
-Assigned To:
+Assigned To: ericsten
[2015-05-08 20:25 UTC] ericsten@php.net
[2015-05-21 17:10 UTC] ericsten@php.net
[2015-05-21 20:55 UTC] ericsten@php.net
-Status: Assigned
+Status: Closed
[2015-05-21 20:55 UTC] ericsten@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 14:00:01 2025 UTC |
Description: ------------ Problem: When function rerouting is enabled (wincache.reroute_enabled=1), the WinCache wrappers for unlink/rmdir do not clear the resolve path cache. Subsequent calls to file_exists erroneously report the removed files as still existing. Test script: --------------- <?php $tmpdir = sys_get_temp_dir() . "/ericsten/"; $wait = 1; $max_wait = 10; /* pre-create */ if (file_exists($tmpdir)) { echo "Directory: " . $tmpdir . " Exists, and it shouldn't! <BR>\n"; } /* create */ mkdir($tmpdir); /* verfiy */ if (file_exists($tmpdir)) { echo "Directory: " . $tmpdir . " Created! <BR>\n"; } else { http_response_code(500); echo "Directory: " . $tmpdir . " Failed to create? <BR>\n"; } /* remove */ rmdir($tmpdir); /* verify removed */ if (file_exists($tmpdir)) { http_response_code(500); echo "Directory: " . $tmpdir . " Exists, even though we deleted it! <BR>\n"; } else { echo "Directory: " . $tmpdir . " Removed. <BR>\n"; exit; } /* wait if not removed */ $total_wait = 0; while ($total_wait < $max_wait) { sleep($wait); $total_wait += $wait; if (file_exists($tmpdir)) { http_response_code(500); echo "Directory: " . $tmpdir . " Still Exists, even though we waited ". $total_wait ." seconds! <BR>\n"; } else { http_response_code(200); echo "Directory: " . $tmpdir . " Removed after " . $total_wait . " seconds. <BR>\n"; break; } } ?> Expected result: ---------------- immediately after calling rmdir or unlink, the file_exists function should return FALSE for the removed item. Actual result: -------------- WordPress updates fail to install, and winds up deleting the existing theme/extension because it thinks the directory still exists.