Skip to main content

How to disable PHP-OPcache per user/site

Comments

12 comments

  • 24x7server
    Hi, Do not use PHP flags in .htaccess, instead create your own custom PHP.ini in the account you want and then define the parameters you need or disable it..
    0
  • Derekn
    Hi, thank you for your help. I tried that also by adding Opcache_enable=0 to php ini in my website user account cpanel, but it didnt work. I ran phpinfo, OPcache is still on. So can you suggest more detail please? Im not really a developer . Thank you so much
    0
  • Muhammed Fasal
    Hi, I think you made a mistake on php.ini file, the correct directive should be opcache.enable=0, not Opcache_enable=0, please try to add below code on your php.ini file and check again. opcache.enable=0
    0
  • Derekn
    Hi, Yes, opcache.enable=0 was what i meant, sorry, but i just tried again. It didnot work, phpinfo still showing on for both Local and master value
    0
  • sparek-3
    What PHP handler are you using?
    0
  • Derekn
    Hi, i believe i am using CGI, system is php-fpm and php7.1 Thank you for your help
    0
  • sparek-3
    Is it php-fpm or is it cgi? If it's CGI, is is suPHP or something else?
    0
  • Derekn
    Hi, i am not sure about this, i clicked php manager --> php handler and it display only cgi, no other information. Above all php handler page it said "PHP Handlers do not apply to PHP-FPM". If this is not the right section to look, can you show me where to look at WHM? I am not a developer:( Thank you so much, and im really appreciated
    0
  • cPanelRyland
    Hello, You can see whether PHP-FPM is enabled for the system via MultiPHP Manager module within WHM (I've included mine below): "Turn on/off PHP-FPM for all accounts. System PHP-FPM Status: Off" Additionally you can see if PHP-FPM is enabled on a per domain basis by checking the domains within the MultiPHP Manager. I have included our documentation regarding PHP-FPM and EasyApache 4 below if PHP-FPM is indeed in use: PHP-FPM and EasyApache 4 - Documentation - cPanel Documentation Please review the above and let us know if you have any questions as we are happy to help.
    0
  • NilsNoldus
    I think with php-fpm you need a local ".user.ini" file in the users home directory, NOT php.ini I just tried to put opcache.enable=0 in the .user.ini for one of my sites and it switched off opcache for that user.
    0
  • Derekn
    Yes, it worked @NilsNoldus (but i have to put user.ini file at public_html directory, NOT home directory). My website is back on after Opcache is disable, but opcache.enable_cli is still on, im not sure about this and what it does? @cPanelRyland, so if I turn of php-fpm for that user/website, opcache will turn off automatically? Thank you so much guys;), im really appreciated
    0
  • cPanelMichael
    Hello, With PHP-FPM, you have to manually edit the PHP-FPM configuration for the domain name to update the php.ini values: MultiPHP INI Editor Values Not Saved for PHP-FPM Sites Outside of PHP-FPM, it's advised to use the MultiPHP INI Editor within cPanel to make changes to your PHP configuration values. Thank you.
    0

Please sign in to leave a comment.