How To Change PHP Versions/Extensions For All Users - Secret Revealed of Offshore Hosting Company | Bulletproof Hosting Directory 2022

How To Change PHP Versions/Extensions For All Users

Under is the checklist of helpful instructions for altering PHP model and extensions, viewing present PHP model utilized by consumer, find out how to change the extensions and PHP choices for a number of or single consumer.

Easy methods to Change the PHP model for all customers

# selectorctl --change-to-version=7.4 --version=native #this command modifications PHP model to 7.4 for all customers with native model

Or use the under command to vary PHP model for all customers 

# cd /var/cpanel/customers
# ls -1 | awk '{ print "selectorctl --set-user-current=7.1 --user="$1 }' | sh

To reset consumer extensions to default settings, use the command under.

selectorctl --list-users --version=7.1 | sed -e 's/,/n/g' | sed 's/^/selectorctl --reset-user-extensions --version=5.6 --user=/'

Should you run the code above;

1. The script will generate an inventory of all customers utilizing PHP 7.1 

2. The script will then generate a separate command to reset the modules for every consumer 

3. Should you add | sh on the finish of the command, the modules can be reset for all customers which have PHP 7.1.

Easy methods to Allow some PHP module for all present accounts

–for-all-users: Permits to allow/disable extensions for all customers with the required PHP model. Works solely with --enable-user-extensions or --disable-user-extensions possibility.

If you wish to get a present PHP model for a selected consumer

selectorctl --user-current --user=UU

To see the checklist of customers utilizing particular PHP model

selectorctl --list-users --version=5.6

If you wish to change change PHP model for a single consumer

selectorctl --set-user-current=5.3 --user=UU

The command for enabling some extensions for a consumer

selectorctl --enable-user-extensions=pdo,phar --version=5.3 --user=UU

To disable extensions, use an identical command however with the –disable-user-extensions parameter.

Use this command to Checklist consumer extensions

selectorctl --list-user-extensions --version=5.3 --user=UU

Exchange possibility in customers php.ini

selectorctl --replace-options=log_errors:on,display_errors:on --version=5.3 --user=UU

offshore vps
Ads Blocker Image Powered by Code Help Pro

Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker. We use only Banner Ads (No Pop Ads)

Powered By
Best Wordpress Adblock Detecting Plugin | CHP Adblock