OPCache + PHP-FPM per user configuration help

Operating System & Version
CENTOS 7.9
cPanel & WHM Version
v92.0.11

nasthik

Registered
Jul 6, 2013
3
1
53
cPanel Access Level
Root Administrator
Hello everyone!

My first time posting on here. So I'm running into a bit a of an issue where the config values I'm setting on a per user (account/domain) basis is not being respected by OPCache. I'm editing the local user.ini file and also php.ini file but still it's picking up the values from the global opcache.ini file (located in: home/opt/cpanel/ea-php74/root/etc/php.d).

Can someone please help me with this issue? I would very much appreciate it!

Thanks for reading :)
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
6,181
788
313
cPanel Access Level
Root Administrator
Hey there - welcome to the forums! From what I'm seeing, opcache values are set globally, so any local values will not be read. I see you can disable as outlined here:


but you can't apply special values per account.
 
  • Like
Reactions: nasthik

nasthik

Registered
Jul 6, 2013
3
1
53
cPanel Access Level
Root Administrator
Hey there - welcome to the forums! From what I'm seeing, opcache values are set globally, so any local values will not be read. I see you can disable as outlined here:


but you can't apply special values per account.
Ahh okay okay! I see. So we can only modify opcache disable/enable setting on per domain basis, while for the other settings we need to modify the global opecache.ini .

I think creating a virtual host file on per domain basis could potentially help achieve this, no? I recently used it for mod_pagespeed so I'm guessing the same can be done for this too.

I'll give it a go and report back! For anyone looking to achieve this in the future and stumbles upon this post
 
  • Like
Reactions: cPRex