OPCache installed but disabled in config (PHP8.1)

tinodesigns

Active Member
Jan 24, 2019
36
2
8
Germany
cPanel Access Level
Root Administrator
Hi,

so I just installed opcache for my MultiPHP Version 8.1.

It installed fine and is showing in the phpinfo(); as "Up and Running" however there is a setting in the configure command '--disable-opcache' .

So how cna I make sure it is enabled, as it seems not to be. My Opcache Gui says ' The Zend OPcache extension does not appear to be installed '.

Can anyone point me in the right direction. I restarted apache but I'm unsure how and if I can restart PHP itself.

Thanks,
Tino
 

ServerHealers

Well-Known Member
Sep 21, 2015
95
53
68
India
cPanel Access Level
Root Administrator

tinodesigns

Active Member
Jan 24, 2019
36
2
8
Germany
cPanel Access Level
Root Administrator
WHM >> Easyapache, for the whole server. I have different PHP Versions running. I first installed PHP 8.1 a few weeks ago until I realized I forgot opcache on PHP 8.1. So I provisoned it again with opcache turned on.

Now it is installed but not running.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
13,427
2,113
363
cPanel Access Level
Root Administrator
Is it possible the account has a local php.ini file that may be causing a conflict? You can check the same PHP info page for the loaded configuation files and see if something there is being loaded that you aren't expecting.

On a test server, once that is installed through EasyApache, it shows up normally in the PHP info page and does have the "--disable-opcache" flag.
 

tinodesigns

Active Member
Jan 24, 2019
36
2
8
Germany
cPanel Access Level
Root Administrator
It hast a php.ini file for the old ea-php56 and ea-php72, which are versions I'd like to get rid of once this PHP 8.1 update is fully functioning.

I also checked other acocunts that now us PHP 8.1 and they all have the same problem PHP 8.1 is setting config to "--disable-opcache"

Would it help if I dump the phpinfo here?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
13,427
2,113
363
cPanel Access Level
Root Administrator
I just meant that on a clean installation, it should *just work* without you needing to do anything.

At this point it would likely be best to create a ticket with our team, since it seems something is weird with the PHP configuration on that system.
 

tinodesigns

Active Member
Jan 24, 2019
36
2
8
Germany
cPanel Access Level
Root Administrator
Seems like I got it to work I just don't know how. May be after restarting some service or switching between the php versions worked. I'm not sure. It is working now.

Thanks for the help.
 

tinodesigns

Active Member
Jan 24, 2019
36
2
8
Germany
cPanel Access Level
Root Administrator
I just double checked all the accounts currently using PHP 8.1 and it is working, I can verify that by using functions like opcache_get_status()

However, the phpinfo somtimes shows me '--disable-opcache' and sometime s that sopws as '--enable-opcache' in the configure command.
The module info further down in the phpinfo does show it as "Up and Running" with memory, hits and other stats.

Does the '--disable-opcache' in the configure command even matter? seems like when it is installed and working, then it is working despite the disable option in the configure command.

It is working though now, so I'm happy, just trying to understand.

Thanks,
Tino
 
Last edited:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
13,427
2,113
363
cPanel Access Level
Root Administrator
I wouldn't expect the PHP info page to flip-flop, as it should matter. I'm wondering if you're seeing cached information on the account after you make your changes. Are you running Nginx or another tool on the machine that could be caching data?