Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED PHP-FPM Multi-php ini Configuration change not being applied?

Discussion in 'EasyApache' started by SupraMario, Aug 7, 2018.

  1. SupraMario

    SupraMario Member

    Joined:
    Mar 28, 2006
    Messages:
    24
    Likes Received:
    3
    Trophy Points:
    153
    hi everyone,

    Recently we converted to php-fpm and I was happy with it, the majority of sites are still on php-56 though, and hence I modified the

    /opt/cpanel/ea-php56/root/etc/php.ini

    Code:
    opcache.enable=1
    opcache.enable_cli=1
    opcache.memory_consumption=2512
    opcache.interned_strings_buffer=8
    opcache.max_accelerated_files=40000
    opcache.revalidate_freq=60
    opcache.fast_shutdown=1
    to include the following opcache improvements.

    Server is 16 core / 16gb ram.

    Today I decided to make similar change in the php70 for the sites that are using that.
    So I went to edit the /opt/cpanel/ea-php70/root/etc/php.ini applied the same configuration.

    Did the normal php-fpm restart via the WHM and when I view the opcache settings, they're still exactly the same as default, ie 128mb ram.

    I can modify the ea-php56 as frequently as I like and when I restart php-fpm the changes are applied, but php-70 nothing happens.

    Cpanel Version : v72.0.10
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,531
    Likes Received:
    1,965
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @SupraMario,

    The OPCache extension uses it's own .ini file at:

    /opt/cpanel/ea-php70/root/etc/php.d/10-opcache.ini

    This is the file you should edit if you want to modify the default global OPcache PHP settings for PHP 7.0. Upon making the changes, ensure to run the following commands:

    Code:
    /scripts/restartsrv_apache_php_fpm
    /scripts/restartsrv_httpd
    The following resource is also available if you'd like to read more about managing php.ini directives with PHP-FPM on a per-account basis or exclusively for domains using PHP-FPM:

    Tutorial - Managing php.ini directives with PHP-FPM

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. SupraMario

    SupraMario Member

    Joined:
    Mar 28, 2006
    Messages:
    24
    Likes Received:
    3
    Trophy Points:
    153
    Hi CpanelMichael,

    Absolutely perfect, thank you very much for your response that worked perfectly.
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,531
    Likes Received:
    1,965
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @SupraMario,

    You're very welcome. I'm glad to see that helped.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice