• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Zend OPcache is loaded but not activated

technique-web

New Pleskian
Server operating system version
Debian 10.13
Plesk version and microupdate number
Plesk Obsidian 18.0.49
Hi,
I've installed WP OPcache Wordpress Plugin and it show this message :
Zend OPcache is loaded but not activated. You need to set opcache.enable=1 in your php.ini
I've enabled opcache extension from Tools & Settings > PHP Settings > Settings for 7.4.33 FPM application :
1678727636113.png

It's also OK in php.ini :
1678727701514.png

phpinfo says it's OK :
1678727840693.png

But the problem remains and the plugin do not display any data about opcache usage :
1678727947538.png

I'm not sure but I thing this is can be the problem root :
1678728057755.png
Maybe the plugin can't read the opcache status since the function is disabled, I've tried many things but nothing happened :(
- I've followed the solution given here : Issue - Unable to change php.ini "disable_functions" globally
- I've enabled opcache in /opt/plesk/php/7.4/etc/php.d/10-opcache.ini (I don't understand why Plesk uses this file !)

Here some details about my server :
OS: Debian 10.13
Product: Plesk Obsidian 18.0.49

What's wrong with opcache under plesk ?
 
The reason why Plesk disabled the opcache_get_status PHP function by default since Plesk Onyx 17.8 was due to the following two security points:
  • On a shared hosting, since any customer is able to call OPcache functions PHP: OPcache Functions - Manual, by clearing out the cache using the function in question, an attacker customer can make the target customer have no benefits from caching;
  • Moreover, an attacker customer can see names of target’s cached PHP files.
If you are not sharing your server with other users, you can go to Domains > example.com > PHP Settings and remove opcache_get_status from disabled functions: Empty the "disable_functions" field:

1678732097056.png

so that it looks like this:

1678732149454.png
Then store the new PHP settings.
 
Back
Top