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 Edit YAML for PHP-FPM

Discussion in 'General Discussion' started by bloom360, Jun 25, 2018.

Tags:
  1. bloom360

    bloom360 Member

    Joined:
    Feb 23, 2015
    Messages:
    19
    Likes Received:
    3
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Hi,

    I have read the docs, including PHP-FPM and EasyApache 4 - Version 60 Documentation - cPanel Documentation but I still need some spoon feeding because I have a bunch of productive sites in this box and I suspect I can very easily break stuff.

    I need to add a single directive to a user's php.ini. But running under PHP-FPM that gets terribly complicated (for me, at least)

    1. I am editing /var/cpanel/userdata/user/user.com.php-fpm.yaml

    2. This file only has:

    Code:
    ---
    _is_present: 1
    3. This is what I need to add (were it a regular php.ini)

    Code:
    extension = "/opt/cpanel/ea-php71/root/usr/lib64/php/modules/sweph.so" 

    So my specific questions:

    1. Do I need to delete the original content "_is_present" etc? (yes/no) or just add to it? Above that or under it?

    2. Do I need to modify the syntax, such as removing the quotes or the dot in ".so" or something? Based on the line I wrote above, what would be the one in the yaml file?

    3. After that, I need to run this?

    Code:
    /scripts/php_fpm_config --rebuild --domain=user.com
    Is that correct? Nothing else?


    Many thanks
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,870
    Likes Received:
    1,811
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @bloom360,

    Setting an "extension=" value is not supported on a per-pool basis with PHP-FPM. You'll notice "extension" is marked as "php.ini only" at:

    PHP: List of php.ini directives - Manual

    Thus, you'd need to install the extension globally for the individual PHP version on the system, and that point it should automatically work any accounts assigned to that version of PHP.

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

    bloom360 Member

    Joined:
    Feb 23, 2015
    Messages:
    19
    Likes Received:
    3
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Many thanks @cPanelMichael

    I wanted to enable for just one user but that's not such a big deal. It is working now.

    Regards
     
    cPanelMichael likes this.
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