grav icon indicating copy to clipboard operation
grav copied to clipboard

Fatal error if opcache_compile_file is included in PHP disable_functions

Open reswild opened this issue 1 year ago • 0 comments

I'm getting fatal errors when I try to run Grav sites on servers where the opcache_compile_file function is restricted using disable_functions in the PHP configuration. The error I'm getting is Call to undefined function Grav\Common\File\opcache_compile_file()

As a workaround, I patched system/src/Grav/Common/File/CompiledFile.php to check for the existence of 'opcache_compile_file' instead of 'opcache_invalidate' in lines 91 and 161.

reswild avatar Jan 31 '24 21:01 reswild