bloom360

Active Member
Feb 23, 2015
28
4
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
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.