PHP Selector and version specific php.ini settings

foggle

Member
Jun 3, 2015
8
1
53
EU
cPanel Access Level
Root Administrator
Hi, when using PHP Selector, does anyone know the correct way to make sure all versions of PHP used by all accounts have (eg) "enable_dl = off" and a good set of "disabled_functions".

I've edited the one in WHM but that php.ini gets overwritten when PHP Selector is used I think.

Many thanks in advance.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello,

Could you confirm if you are referring to the "PHP Selector" option provided by CloudLinux, or the MultiPHP functionality in EasyApache 4?

Thank you.
 

foggle

Member
Jun 3, 2015
8
1
53
EU
cPanel Access Level
Root Administrator
Hi Michael, sorry yes I was, so probably shouldn't have asked that question here. When I posted I wasn't aware of MultiPHP or that PHP Selector was a CloudLinux feature.

I edited all the /opt/alt/phpXX/etc/php.ini files (where XX refers to the PHP version number) and that works but is convoluted, there is maybe a better way.
 

Bazinga

Active Member
Verifed Vendor
Aug 23, 2016
32
7
8
Ukraine
cPanel Access Level
Website Owner
Hi Michael, sorry yes I was, so probably shouldn't have asked that question here. When I posted I wasn't aware of MultiPHP or that PHP Selector was a CloudLinux feature.

I edited all the /opt/alt/phpXX/etc/php.ini files (where XX refers to the PHP version number) and that works but is convoluted, there is maybe a better way.
You have found right way to modify default values. However, there is even more global way to do it - use /etc/cl.selector/global_php.ini file and values would be applied for all PHP versions.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,268
463
Hello,

I'm happy to see the issue is now resolved. Note that additional documentation on "PHP Selector" is found at:

CloudLinux Documentation

Thank you.