CloudLinux - PHP Selector: How to adjust php values and where they are stored

Dell keeps their Linux servers on and secure with KernelCare - all the latest security patches are promptly applied to running kernels

TRY FREE FOR 30 DAYS
Do you have questions about how php-selector works or how to customize php for your needs? We will try to answer them in next few posts.

PHP Selector is a CloudLinux component that sits on top of CageFS and allows each user to select PHP version & modules based on the customer's needs

Global PHP defaults for PHP Selector - php version and enabled modules are configured in /etc/cl.selector/defaults.cfg .

Default values are one applied for all users and are active as long as they are not changed by use. They are set in /opt/alt/phpXX/etc/php.ini file, where XX is the php version. For example, default php.ini for php 5.3 will be /opt/alt/php53/etc/php.ini . The settings from that file will not be overwritten with the next update, so that is the place where you should set your customized values like timezone or disable_functions, etc...

Users can change php values using control panel interface. By doing that, new /etc/cl.php.d/alt-php52/alt_php.ini file will be generated (path accessible only from inside of CageFS and will have different file for each user). Settings in that file will overwrite settings from php.ini . The exhaustive list of directives and values that customers are allowed to change are set in /etc/cl.selector/php.conf file.

The command cagefsctl --rebuild-alt-php-ini rebuilds customers alt_php.ini files, based on custom values from /home/USER/.cl.selector/alt_phpXX.cfg.

Checking current PHP version for any specific customer could be done with /usr/bin/cl-selector --current=php --user=USERNAME command.

Administrator may force update of any individual php.ini settings using /usr/bin/piniset tool.

Example command to change upload maximum filesize value would be:

/usr/bin/piniset -r 'upload_max_filesize:16M' -u USERNAME

You may find more information in our documentation at http://docs.cloudlinux.com/index.html?php_selector.html

Put an end to reboots forever with a single command

TRY FREE FOR 30 DAYS
frank doud

"Quickest turnaround for security patches I have ever seen. Outstanding product and service. Plug and Play. This product is #1 at protecting your server’s kernel."

Frank Doud
Owner of G.C. Solutions

1,500+ companies are running their servers securely without reboots

Trusted by Companies Like Yours