Sometimes you might want to have a single customer with a different php.ini, than the rest of your customers.
To do that, you will use custom.etc directory functionality:
1. Move default php.ini into /etc directory and create a symlink to it:
$ mv /usr/local/lib/php.ini /etc/php.ini
$ ln -fs /etc/php.ini /usr/local/lib/php.ini
2. Change path to php.ini in /etc/cl.selector/native.conf file to:
3. For each user that needs custom php.ini file, create directory /etc/cagefs/custom.etc/USER_NAME/php.ini.
For example if you want to create custom php.ini for USER1 and USER2 you would create files:
Create such files for each user that should have custom php.ini file.
$ cagefsctl --force-update
1.Make sure that php.ini load path is set to /etc/php.ini.
2.Users will be able to override settings of those php.ini files (global or custom) via PHP Selector. if you want to prevent that, you should disable PHP Selector feature.
3.Even if PHP Selector is disabled, user can override php settings by using ini_set() php function in php script, or by "php -c" command line option.
4.If you modify anything in /etc/cagefs/custom.etc directory, you should execute:
$ cagefsctl --update-etc
in order to apply changes to CageFS for all users or:
$ cagefsctl --update-etc user1 user2
to apply changes to CageFS for specific users.