flex icon indicating copy to clipboard operation
flex copied to clipboard

OPcache API is restricted by "restrict_api"

Open Soonz opened this issue 1 year ago • 4 comments

Hi,

I recently encoutered an error that I managed to fix, it happens in the BundlesConfigurator.php file at line 121 :

opcache_invalidate($file);

I couldn't run anything with it this way, I always had the error :

Warning: Zend OPcache API is restricted by "restrict_api"

I changed the line by @opcache_invalidate($file); and it worked fine.

Would have like to submit this as a definitive fix but it might be related to my hosting system.

This happened on a OVH hosting with PHP 8.1

Thanks.

Soonz avatar Jul 27 '23 09:07 Soonz

please send a PR

nicolas-grekas avatar Jul 27 '23 09:07 nicolas-grekas

I wanted to but I can't.

My "Create pull request" button is grayed out for some reason.

xcwxc69wxcwx9cxw9

I'm not familiar with GitHub, sorry.

Soonz avatar Jul 27 '23 09:07 Soonz

What I find odd is, why a warning stops the execution of the code ? The only thing I'm doing here is ignoring warnings.

This happened during the installation of EasyAdminBundle and completely stopped the process.

Soonz avatar Jul 27 '23 09:07 Soonz

My "Create pull request" button is grayed out for some reason.

You need to choose another branch, just above the big yellow banner

image

lyrixx avatar Jul 27 '23 13:07 lyrixx