Configuring "Global” php.ini Options for all Alt-PHP Versions

Navigation:  PHP Selector >

Configuring "Global” php.ini Options for all Alt-PHP Versions

Previous pageReturn to chapter overviewNext page

[CageFS 6.0-33 or higher, LVE Manager 2.0-11.2 or higher]


There is /etc/cl.selector/global_php.ini file, where you can specify values of PHP options that should be applied for all Alt-PHP versions that are installed on a server. These settings will also be automatically applied to the new Alt-PHP versions that will be installed later.




# cat /etc/cl.selector/global_php.ini

[Global PHP Settings]

date.timezone = Europe/Warsaw

error_log = error_log

memory_limit = 192M


Sections are ignored. Only name of an option and a value have meaning.


When an option is absent in /etc/cl.selector/global_php.ini file, than it is not changed (applied) to php.ini for Alt-PHP versions.


date.timezone and error_log options are handled differently than the others. When these options are not in /etc/cl.selector/global_php.ini file, than values for the options will be taken from "native" php.ini file. And when the option is in php.ini for some Alt-PHP version already (and its value is not empty), than value from /etc/cl.selector/global_php.ini will be NOT applied.


To confirm changes (not affecting "date.timezone" and "error_log" options) please run:


/usr/sbin/cagefsctl --setup-cl-selector


To confirm changes (including "date.timezone" and "error_log" options) please run:


/usr/bin/selectorctl --apply-global-php-ini




/usr/sbin/cagefsctl --apply-global-php-ini


(two commands above work the same way).


If you don't want to change error_log, but want to change date.timezone, you can execute:


selectorctl --apply-global-php-ini date.timezone


Similarly, command "selectorctl --apply-global-php-ini error_log" applies error_log and all other options specified in /etc/cl.selector/global_php.ini file, except date.timezone.


So, you can specify 0, 1 or 2 parameters from the list: error_log, date.timezone.


Using --apply-global-php-ini without arguments applies all global PHP options including two above.




selectorctl --apply-global-php-ini error_log

selectorctl --apply-global-php-ini date.timezone

selectorctl --apply-global-php-ini date.timezone error_log


The latter command has the same effect as /usr/bin/selectorctl --apply-global-php-ini