Bug #69773
closedWarning when clearing all caches from within install tool
100%
Description
When using the "clearAllCache" button an error message gets shown when the APC file cache is used:
Warning: apc_delete_file(): Could not stat file /[...]/typo3temp/Cache, unable to delete from cache. in /[...]/typo3_src-6.2.14/typo3/sysext/core/Classes/Utility/OpcodeCacheUtility.php on line 84
Reason is that the called method "OpcodeCacheUtility::clearAllActive($directory)" from within "GeneralUtility::flushDirectory()" [1] will not allow to clear whole directories. Per definition the used method "apc_delete_file()" allows only to delete single file-cache entries from the APC cache when called with a string argument.
So for this to work the method "apc_delete_file()" would have to get changed to something like the following snippet when called with a directory argument:
$iterator = new \APCIterator('file', '/^'.preg_quote('/path/to/webroot/typo3temp/Cache/', '/') . '.*/'); apc_delete_file($iterator);
In fact "apc_delete_file()" won't generate a warning when there is no cache entry for the passed file (or even directory). But in this special situation a warning is generated because the passed path does not exist. Line 2827 of [1] will rename/delete the directory, in the next line the "OpcodeCacheUtility::clearAllActive()" will cause the warning. Only then afterwards the directory will get recreated.
Updated by Gerrit Code Review almost 9 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43287
Updated by Gerrit Code Review almost 9 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43287
Updated by Gerrit Code Review almost 9 years ago
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/43289
Updated by Gerrit Code Review over 8 years ago
Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43289
Updated by Gerrit Code Review over 8 years ago
Patch set 3 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/43289
Updated by Anonymous over 8 years ago
- Status changed from Under Review to Resolved
- % Done changed from 50 to 100
Applied in changeset 08ef6cd095c0c3d5ffee2ab622a048e981794cd3.
Updated by Riccardo De Contardi almost 7 years ago
- Status changed from Resolved to Closed