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 and excluding files from opcache

Discussion in 'EasyApache' started by APatchworkBoy, Aug 16, 2018.

Tags:
  1. APatchworkBoy

    APatchworkBoy Active Member

    Joined:
    Feb 26, 2018
    Messages:
    25
    Likes Received:
    7
    Trophy Points:
    3
    Location:
    West Yorkshire, UK
    cPanel Access Level:
    Root Administrator
    Afternoon folks - in latest stable, where would be the correct spot to place this for EA4 php7.1 FPM?

    Code:
    opcache.blacklist_filename=/path/to/opcache-blacklist.txt
    (Referencing: How to disable PHP OPCache for certain directories | en.code-bude.net)

    Am looking at /opt/cpanel/ea-php71/root/etc/php-fpm.d/{domain}.conf but the file states that it's generated and to use WHM Interface.

    Or is it as simple as adding the paths to the existing blacklist in /opt/cpanel/ea-php71/root/etc/php.d/opcache-default.blacklist and restarting php-fpm? (Do changes in php.d/ also impact php-fpm.d/ ?)
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,324
    Likes Received:
    2,157
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello @APatchworkBoy,

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

    /opt/cpanel/ea-php71/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.1. 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...
    APatchworkBoy likes this.
  3. APatchworkBoy

    APatchworkBoy Active Member

    Joined:
    Feb 26, 2018
    Messages:
    25
    Likes Received:
    7
    Trophy Points:
    3
    Location:
    West Yorkshire, UK
    cPanel Access Level:
    Root Administrator
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