Actions
Bug #97826
closedCritical error with opcache_invalidate() function
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2022-06-29
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:
Description
On a shared web hosting, i have this error :
typo3_src-11.5.12/typo3/sysext/core/Classes/Service/OpcodeCacheService.php, line 41: Call to undefined function TYPO3\CMS\Core\Service\opcache_invalidate()
It's because the opcache.restrict_api parameter is very restrictive, and deny TYPO3 scripts to access the function.
The isClearable() function in the OpcodeCacheService class should not only check if the function is enable, but also if the function exists (see for example this Wordpress check: https://developer.wordpress.org/reference/functions/wp_opcache_invalidate/)
Actions